meep-1.3/0000755000175400001440000000000012506541114007303 500000000000000meep-1.3/tests/0000755000175400001440000000000012506541114010445 500000000000000meep-1.3/tests/flux.cpp0000644000175400001440000002732612506540456012071 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } static double width = 20.0; double bump(const vec &pt) { return (fabs(pt.z()-50.0) > width)?1.0:12.0; } double bump2(const vec &pt) { return (fabs(pt.z()-5.0) > 3.0)?1.0:12.0; } double cavity(const vec &pt) { const double zz = fabs(pt.z() - 7.5) + 0.3001; if (zz > 5.0) return 1.0; if (zz < 2.0) return 1.0; double norm = zz; while (norm > 1.0) norm -= 1.0; if (norm > 0.3) return 1.0; return 12.0; } int compare(double a, double b, double eps, double thresh, const char *n) { if (fabs(a-b) > fabs(b)*eps && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { if (fabs(a-b) > fabs(b)*eps*1.1 && fabs(b) > thresh) master_printf("%s fractional error is %g, close to %g threshold.\n", n, fabs(a-b)/fabs(b), eps); return 1; } } static inline double min(double a, double b) { return (aflux(); flux_right += f.dt*right->flux(); } delta_energy -= f.field_energy_in_box(mid.surroundings()); master_printf("Final energy is %g\n", f.field_energy_in_box(mid.surroundings())); master_printf("Final electric energy is %g\n", f.electric_energy_in_box(mid.surroundings())); const double del = flux_left; const double der = flux_right - delta_energy; master_printf(" Delta E:\t%g\n Flux left:\t%g\n Flux right:\t%g\n Ratio:\t%g\n", delta_energy, del, der, del/der); return compare(del, der, 0.06, 0, "Flux"); } int split_1d(double eps(const vec &), int splitting) { const double boxwidth = 5.0, timewait = 1.0; const double zmax = 15.0, a = 10.0; grid_volume gv = volone(zmax,a); structure s1(gv, eps, pml(2.0)); structure s(gv, eps, pml(2.0), identity(), splitting); fields f1(&s1); fields f(&s); f1.use_real_fields(); f.use_real_fields(); f1.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); f.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); flux_vol *left1 = f1.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); flux_vol *left = f.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); grid_volume mid = volone(2*boxwidth,a); mid.set_origin(vec(zmax*.5-boxwidth-0.25/a)); const double ttot = f.last_source_time() + timewait; const double tol = sizeof(realnum) == sizeof(float) ? 1e-3 : 1e-9; while (f.time() < ttot) { f1.step(); f.step(); if (!compare(f.dt*left1->flux(), f.dt*left->flux(), tol, tol, "Flux")) return 0; } return 1; } int cavity_1d(const double boxwidth, const double timewait, double eps(const vec &)) { const double zmax = 15.0; const double a = 10.0; grid_volume gv = volone(zmax,a); structure s(gv, eps, pml(2.0)); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); flux_vol *left = f.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); flux_vol *right = f.add_flux_plane(vec(zmax*.5+boxwidth), vec(zmax*.5+boxwidth)); grid_volume mid = volone(2*boxwidth,a); mid.set_origin(vec(zmax*.5-boxwidth-0.25/a)); while (f.time() < f.last_source_time()) f.step(); const double ttot = f.time() + timewait; double flux_left=0.0, flux_right=0.0; const double start_energy = f.field_energy_in_box(mid.surroundings()); master_printf(" Energy starts at\t%g\n", start_energy); while (f.time() < ttot) { f.step(); flux_left += f.dt*left->flux(); flux_right += f.dt*right->flux(); } const double delta_energy = start_energy - f.field_energy_in_box(mid.surroundings()); const double defl = flux_right - flux_left; master_printf(" Delta E: \t%g\n Integrated Flux:\t%g\n", delta_energy, defl); master_printf(" Ratio: \t%g\n", delta_energy/defl); master_printf(" Fractional error:\t%g\n", (delta_energy - defl)/start_energy); return compare(start_energy - delta_energy, start_energy - defl, (timewait>50)?0.032:0.004, 0, "Flux"); } int flux_2d(const double xmax, const double ymax, double eps(const vec &)) { const double a = 8.0; master_printf("\nFlux_2d(%g,%g) test...\n", xmax, ymax); grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps, pml(0.5)); fields f(&s); f.use_real_fields(); f.add_point_source(Ez, 0.25, 3.5, 0., 8., vec(xmax/6+0.1, ymax/6+0.3), 1.); // corners of flux planes and energy box: vec lb(vec(xmax/3, ymax/3)), rb(vec(2*xmax/3, ymax/3)); vec lt(vec(xmax/3, 2*ymax/3)), rt(vec(2*xmax/3, 2*ymax/3)); volume box(lb, rt); flux_vol *left = f.add_flux_plane(lb, lt); flux_vol *right = f.add_flux_plane(rb, rt); flux_vol *bottom = f.add_flux_plane(lb, rb); flux_vol *top = f.add_flux_plane(lt, rt); /* measure flux spectra through two concentric flux boxes around the source...should be positive and equal */ volume box1(vec(xmax/6-0.4, ymax/6-0.2), vec(xmax/6+0.6, ymax/6+0.8)); volume box2(vec(xmax/6-0.9, ymax/6-0.7), vec(xmax/6+1.1, ymax/6+1.3)); double fmin = 0.23, fmax = 0.27; int Nfreq = 10; dft_flux flux1 = f.add_dft_flux_box(box1, fmin, fmax, Nfreq); dft_flux flux2 = f.add_dft_flux_box(box2, fmin, fmax, Nfreq); const double ttot = 130; /* first check: integral of flux = change in energy of box */ f.step(); double init_energy = f.field_energy_in_box(box); master_printf("Initial energy is %g\n", init_energy); long double fluxL = 0; while (f.time() < ttot) { f.step(); fluxL += f.dt * (left->flux() - right->flux() + bottom->flux() - top->flux()); } double flux = fluxL; double del_energy = f.field_energy_in_box(box) - init_energy; master_printf("Final energy is %g\n", f.field_energy_in_box(box)); master_printf(" delta E: %g\n net flux: %g\n ratio: %g\n", del_energy, flux, del_energy/flux); if (!compare(del_energy, flux, 0.09, 0, "Flux")) return 0; /* second check: flux spectrum is same for two concentric boxes containing the source. */ while (f.time() < ttot*2) { f.step(); } master_printf(" energy after more time is %g\n",f.field_energy_in_box(box)); master_printf(" and energy in box2 is %g\n", f.field_energy_in_box(box2)); double *fl1 = flux1.flux(); double *fl2 = flux2.flux(); for (int i = 0; i < Nfreq; ++i) { master_printf(" flux(%g) = %g vs. %g (rat. = %g)\n", fmin + i * flux1.dfreq, fl1[i],fl2[i], fl1[i] / fl2[i]); if (!compare(fl1[i], fl2[i], 0.09, 0, "Flux spectrum")) return 0; } delete fl2; delete fl1; return 1; } int flux_cyl(const double rmax, const double zmax, double eps(const vec &), int m) { const double a = 8.0; master_printf("\nFlux_cyl(%g,%g) test...\n", rmax, zmax); grid_volume gv = volcyl(rmax,zmax,a); structure s(gv, eps, pml(0.5), identity(), 0, min(0.5, 1 / (abs(m)+0.5))); fields f(&s, m); // f.use_real_fields(); f.add_point_source(Ep, 0.25, 3.5, 0., 8., veccyl(rmax*5/6+0.1, zmax/6+0.3), 1.); // corners of flux planes and energy box: vec lb(veccyl(-rmax/3, zmax/3)), rb(veccyl(2*rmax/3, zmax/3)); vec lt(veccyl(-rmax/3, 2*zmax/3)), rt(veccyl(2*rmax/3, 2*zmax/3)); volume box(lb, rt); /* measure flux spectra through two concentric flux boxes around the source...should be positive and equal */ volume box1(veccyl(rmax*5/6-0.4, zmax/6-0.2), veccyl(rmax*5/6+0.6, zmax/6+0.8)); volume box2(veccyl(rmax*5/6-0.9, zmax/6-0.7), veccyl(rmax*5/6+1.1, zmax/6+1.3)); double fmin = 0.23, fmax = 0.27; int Nfreq = 10; dft_flux flux1 = f.add_dft_flux_box(box1, fmin, fmax, Nfreq); dft_flux flux2 = f.add_dft_flux_box(box2, fmin, fmax, Nfreq); flux_vol *left = f.add_flux_plane(lb, lt); flux_vol *right = f.add_flux_plane(rb, rt); flux_vol *bottom = f.add_flux_plane(lb, rb); flux_vol *top = f.add_flux_plane(lt, rt); const double ttot = 130; f.step(); double init_energy = f.field_energy_in_box(box); master_printf("Initial energy is %g\n", init_energy); long double fluxL = 0; while (f.time() < ttot) { f.step(); fluxL += f.dt * (left->flux() - right->flux() + bottom->flux() - top->flux()); } double flux = fluxL; double del_energy = f.field_energy_in_box(box) - init_energy; master_printf("Final energy is %g\n", f.field_energy_in_box(box)); master_printf(" delta E: %g\n net flux: %g\n ratio: %g\n", del_energy, flux, del_energy/flux); if (!compare(del_energy, flux, 0.08, 0, "Flux")) return 0; while (f.time() < ttot*2) { f.step(); } master_printf(" energy after more time is %g\n",f.field_energy_in_box(box)); master_printf(" and energy in box2 is %g\n", f.field_energy_in_box(box2)); double *fl1 = flux1.flux(); double *fl2 = flux2.flux(); for (int i = 0; i < Nfreq; ++i) { master_printf(" flux(%g) = %g vs. %g (rat. = %g)\n", fmin + i * flux1.dfreq, fl1[i],fl2[i], fl1[i] / fl2[i]); if (!compare(fl1[i], fl2[i], 0.08, 0, "Flux spectrum")) return 0; } delete fl2; delete fl1; return 1; } void attempt(const char *name, int allright) { if (allright) master_printf("Passed %s\n", name); else abort("Failed %s!\n", name); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Trying out the fluxes...\n"); attempt("Split flux plane split by 7...", split_1d(cavity, 7)); attempt("Cavity 1D 1.3 73", cavity_1d(1.3, 73.0, cavity)); attempt("Cavity 1D 5.0 1", cavity_1d(5.0, 1.0, cavity)); attempt("Cavity 1D 3.85 55", cavity_1d(3.85, 55.0, cavity)); width = 20.0; attempt("Flux 1D 20", flux_1d(100.0, bump)); width = 10.0; attempt("Flux 1D 10", flux_1d(100.0, bump)); width = 300.0; attempt("Flux 1D 300", flux_1d(100, bump)); width = 5.0; attempt("Flux 2D 5", flux_2d(10.0, 10.0, bump2)); width = 5.0; attempt("Flux cylindrical 5", flux_cyl(20.0, 10.0, bump2, 1)); return 0; } meep-1.3/tests/Makefile.am0000644000175400001440000000477212506314611012433 00000000000000SRC = aniso_disp.cpp bench.cpp bragg_transmission.cpp \ convergence_cyl_waveguide.cpp cylindrical.cpp flux.cpp harmonics.cpp \ integrate.cpp known_results.cpp near2far.cpp one_dimensional.cpp \ physical.cpp stress_tensor.cpp symmetry.cpp three_d.cpp \ two_dimensional.cpp 2D_convergence.cpp h5test.cpp pml.cpp EXTRA_DIST = $(SRC) OBJ = $(SRC:.cpp=.o) DAC = $(SRC:.cpp=.dac) DONE = $(SRC:.cpp=.done) LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la AM_CPPFLAGS = -I$(top_srcdir)/src .SUFFIXES = .dac .done check_PROGRAMS = aniso_disp bench bragg_transmission convergence_cyl_waveguide cylindrical flux harmonics integrate known_results near2far one_dimensional physical stress_tensor symmetry three_d two_dimensional 2D_convergence h5test pml aniso_disp_SOURCES = aniso_disp.cpp aniso_disp_LDADD = $(LIBMEEP) bench_SOURCES = bench.cpp bench_LDADD = $(LIBMEEP) bragg_transmission_SOURCES = bragg_transmission.cpp bragg_transmission_LDADD = $(LIBMEEP) convergence_cyl_waveguide_SOURCES = convergence_cyl_waveguide.cpp convergence_cyl_waveguide_LDADD = $(LIBMEEP) cylindrical_SOURCES = cylindrical.cpp cylindrical_LDADD = $(LIBMEEP) flux_SOURCES = flux.cpp flux_LDADD = $(LIBMEEP) harmonics_SOURCES = harmonics.cpp harmonics_LDADD = $(LIBMEEP) integrate_SOURCES = integrate.cpp integrate_LDADD = $(LIBMEEP) known_results_SOURCES = known_results.cpp known_results_LDADD = $(LIBMEEP) near2far_SOURCES = near2far.cpp near2far_LDADD = $(LIBMEEP) one_dimensional_SOURCES = one_dimensional.cpp one_dimensional_LDADD = $(LIBMEEP) physical_SOURCES = physical.cpp physical_LDADD = $(LIBMEEP) stress_tensor_SOURCES = stress_tensor.cpp stress_tensor_LDADD = $(LIBMEEP) symmetry_SOURCES = symmetry.cpp symmetry_LDADD = $(LIBMEEP) three_d_SOURCES = three_d.cpp three_d_LDADD = $(LIBMEEP) two_dimensional_SOURCES = two_dimensional.cpp two_dimensional_LDADD = $(LIBMEEP) 2D_convergence_SOURCES = 2D_convergence.cpp 2D_convergence_LDADD = $(LIBMEEP) h5test_SOURCES = h5test.cpp h5test_LDADD = $(LIBMEEP) pml_SOURCES = pml.cpp pml_LDADD = $(LIBMEEP) TESTS = aniso_disp bench bragg_transmission convergence_cyl_waveguide cylindrical flux harmonics integrate known_results near2far one_dimensional physical stress_tensor symmetry three_d two_dimensional 2D_convergence h5test pml LOG_COMPILER = $(RUNCODE) # Note: this requires GNU make .o.dac: $(CXXLINK) $< $(LIBMEEP) $(LIBS) $(DAC): $(LIBMEEP) .dac.done: $(RUNCODE) ./$< touch $@ benchmark: bench $(RUNCODE) ./bench dac: $(DAC) clean-local:: rm -f *.o *.dac debug_out_* *.done meep-1.3/tests/stress_tensor.cpp0000644000175400001440000000526312322770765014030 00000000000000#include using namespace meep; using namespace std; const double sx = 5.0; const double sy = 3.0; const double dpml = 1.0; const double d = 0.35; const double sw = 1.0; const double res = 20; double two_waveguides(const vec &p) { if ((fabs(p.x()) >= 0.5*d) && (fabs(p.x()) <= 0.5*d+sw) && (p.y() <= 0.5*sw) && (p.y() >= -0.5*sw)) return 11.9; else return 1.0; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; grid_volume gv = vol3d(sx+2*dpml,sy+2*dpml,0,res); gv.center_origin(); const symmetry S = mirror(X,gv) - mirror(Y,gv); structure s(gv, two_waveguides, pml(dpml,X)+pml(dpml,Y), S); s.set_epsilon(two_waveguides); fields f(&s); f.use_bloch(vec(0,0,0.5)); f.add_point_source(Ey, 0.22, 0.06, 0.0, 4.0, vec(0.5*(d+sw),0,0)); f.add_point_source(Ey, 0.22, 0.06, 0.0, 4.0, vec(-0.5*(d+sw),0,0)); #if 0 double T = f.last_source_time(); int iT = T / f.dt; while (f.t < iT) { if (f.t % (iT / 10) == 0) master_printf("%g%% done with source\n", f.time()/T * 100); f.step(); } double T2 = 300; int iT2 = T2 / f.dt; complex *vals = new complex[iT2]; while (f.t - iT < iT2) { if ((f.t - iT) % (iT2 / 10) == 0) master_printf("%g%% done with harminv\n", (f.t - iT) * 100.0 / iT2); f.step(); vals[f.t - iT - 1] = f.get_field(Ey, vec(0.5*(d+sw),0.,0.)); } complex amps[8]; double freqs_re[8], freqs_im[8]; master_printf("done with timestepping, running harminv...\n"); int num = do_harminv(vals, iT2, f.dt, 0.19, 0.25, 8, amps, freqs_re, freqs_im); master_printf("harminv found %d modes\n",num); for (int i=0;i 0.1; // MPB: -0.33628872 } meep-1.3/tests/two_dimensional.cpp0000644000175400001440000003231212506540456014275 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } double targets(const vec &pt) { const double r = sqrt(pt.x()*pt.x() + pt.y()*pt.y()); double dr = r; while (dr > 1) dr -= 1; if (dr > 0.7001) return 12.0; return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-5; #else static const double tol = 1e-11, thresh = 1e-5; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol * abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g, time %g\n", p.x(), p.y(), f1.time()); return 0; } } } return 1; } int test_metal(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); s.add_susceptibility(one, E_stuff, lorentzian_susceptibility(0.3, 0.1)); s1.add_susceptibility(one, E_stuff, lorentzian_susceptibility(0.3, 0.1)); master_printf("Metal+dispersion test using %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double field_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } int test_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7)); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7)); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double field_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } int test_periodic_tm(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic 2D TM test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double field_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } int test_pml(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps, pml(1.0, X) + pml(1.0, Y, High)); structure s(gv, eps, pml(1.0, X) + pml(1.0, Y, High), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,0.5), 1.0); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,0.5), 1.0); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,0.401), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double field_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.field_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= field_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.field_energy(); if (!compare(new_energy, f1.field_energy(), " total energy")) return 0; if (new_energy > last_energy*1e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } field_energy_check_time += deltaT; } } return 1; } int test_pml_tm(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 3.0, a); structure s1(gv, eps, pml(1.0)); structure s(gv, eps, pml(1.0), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing TM pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,1.401), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,1.401), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double field_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.field_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= field_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.field_energy(); if (!compare(new_energy, f1.field_energy(), " total energy")) return 0; if (new_energy > last_energy*4e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } field_energy_check_time += deltaT; } } return 1; } int test_pml_te(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 3.0, a); structure s1(gv, eps, pml(1.0)); structure s(gv, eps, pml(1.0), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing TE pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,1.5), 1.0); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.37,1.27), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,1.5), 1.0); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.37,1.27), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double field_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.field_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= field_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.field_energy(); if (!compare(new_energy, f1.field_energy(), " total energy")) return 0; if (new_energy > last_energy*1.1e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } field_energy_check_time += deltaT; } } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "two_dimensional-out"; trash_output_directory(mydirname); master_printf("Testing 2D...\n"); for (int s=2;s<4;s++) if (!test_pml(one, s, mydirname)) abort("error in test_pml vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_tm(one, s, mydirname)) abort("error in test_pml_tm vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_te(one, s, mydirname)) abort("error in test_pml_te vacuum\n"); for (int s=2;s<4;s++) if (!test_metal(one, s, mydirname)) abort("error in test_metal vacuum\n"); //if (!test_metal(one, 200, mydirname)) abort("error in test_metal vacuum\n"); for (int s=2;s<5;s++) if (!test_metal(targets, s, mydirname)) abort("error in test_metal targets\n"); //if (!test_metal(targets, 60, mydirname)) abort("error in test_metal targets\n"); for (int s=2;s<5;s++) if (!test_periodic(targets, s, mydirname)) abort("error in test_periodic targets\n"); //if (!test_periodic(one, 200, mydirname)) // abort("error in test_periodic targets\n"); for (int s=2;s<4;s++) if (!test_periodic_tm(one, s, mydirname)) abort("error in test_periodic_tm vacuum\n"); return 0; } meep-1.3/tests/h5test.cpp0000644000175400001440000003627412322771020012316 00000000000000#include #include #include #include #include #include #include "meep_internals.hpp" #include "config.h" using namespace meep; using namespace std; const double xsize = 2.0; const double ysize = 2.0; const double zsize = 0.6; const double r = 0.5; const double eps_k = 2*pi / 1.0; double funky_eps_2d(const vec &p_) { vec p = p_ - vec(xsize / 2, ysize / 2); if (fabs(p & p) < r * r) return 1.0; return 2.0 + cos(p.x() * eps_k) * cos(p.y() * eps_k); } double funky_eps_3d(const vec &p_) { vec p = p_ - vec(xsize / 2, ysize / 2, zsize / 2); if (fabs(p & p) < r * r) return 1.0; return 2.0 + cos(p.x() * eps_k) * cos(p.y() * eps_k) * cos(p.z() * eps_k); } symmetry make_identity(const grid_volume &gv) { (void) gv; // unused return identity(); } symmetry make_mirrorx(const grid_volume &gv) { return mirror(X, gv); } symmetry make_mirrory(const grid_volume &gv) { return mirror(Y, gv); } symmetry make_mirrorxy(const grid_volume &gv) { return mirror(X, gv) + mirror(Y, gv); } symmetry make_rotate4z(const grid_volume &gv) { return rotate4(Z, gv); } typedef symmetry (*symfunc)(const grid_volume &); const double tol = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-8; double compare(double a, double b, const char *nam, int i0,int i1,int i2) { if (fabs(a-b) > tol*tol + fabs(b) * tol || b != b) { master_printf("%g vs. %g differs by\t%g\n", a, b, fabs(a-b)); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); abort("Error in %s at (%d,%d,%d)\n", nam, i0,i1,i2); } return fabs(a-b); } double get_reim(complex x, int reim) { return reim ? imag(x) : real(x); } bool check_2d(double eps(const vec &), double a, int splitting, symfunc Sf, double kx, double ky, component src_c, int file_c, volume file_gv, bool real_fields, int expected_rank, const char *name) { const grid_volume gv = vol2d(xsize, ysize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); f.use_bloch(X, real_fields ? 0.0 : kx); f.use_bloch(Y, real_fields ? 0.0 : ky); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= int(Dielectric)) real_fields = true; while (f.time() <= 3.0 && !interrupt) f.step(); h5file *file = f.open_h5file(name); if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), file_gv, file); else f.output_hdf5(component(file_c), file_gv, file); file->write("stringtest", "Hello, world!\n"); delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); char *str = file->read("stringtest"); if (strcmp(str, "Hello, world!\n")) abort("Failed to read back string test from %s...", name); // compute corner coordinate of file data vec loc0(file_gv.get_min_corner()); ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(loc0.in_direction(d)*a-.5))); if (file_gv.in_direction(d) == 0.0 && 1. - file_gv.in_direction_min(d)*a + 0.5*iloc0.in_direction(d) <= 1. + file_gv.in_direction_max(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } loc0 = gv[iloc0]; double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[2] = {1, 1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 2); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", name, dataname); if (rank != expected_rank) abort("incorrect rank (%d instead of %d) in %s:%s\n", rank, expected_rank, name, dataname); if (expected_rank == 1 && file_gv.in_direction_min(X) == file_gv.in_direction_max(X)) { dims[1] = dims[0]; dims[0] = 1; } vec loc(loc0.dim); for (int i0 = 0; i0 < dims[0]; ++i0) { for (int i1 = 0; i1 < dims[1]; ++i1) { loc.set_direction(X, loc0.in_direction(X) + i0 * gv.inva); loc.set_direction(Y, loc0.in_direction(Y) + i1 * gv.inva); int idx = i0 * dims[1] + i1; /* Ugh, for rotational symmetries (which mix up components etc.), we can't guarantee that a component is *exactly* the same as its rotated version, and we don't know which one was written to the file. */ int cs = file_c; complex ph = 1.0; double diff = fabs(get_reim(f.get_field(file_c, loc), reim) - h5data[idx]); for (int sn = 1; sn < f.S.multiplicity(); ++sn) { vec loc2(f.S.transform(loc, sn)); int cs2 = f.S.transform(file_c, sn); complex ph2 = f.S.phase_shift(cs2, -sn); double diff2 = fabs(get_reim(f.get_field(cs2, loc2)*ph2, reim) - h5data[idx]); if (diff2 < diff) { loc = loc2; cs = cs2; ph = ph2; diff = diff2; } } double err = compare(h5data[idx], get_reim(f.get_field(cs, loc) * ph, reim), name, i0,i1,0); err_max = max(err, err_max); data_min = min(data_min, h5data[idx]); data_max = max(data_max, h5data[idx]); } } delete[] h5data; } file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / max(fabs(data_min), fabs(data_max))); return true; } bool check_3d(double eps(const vec &), double a, int splitting, symfunc Sf, component src_c, int file_c, volume file_gv, bool real_fields, int expected_rank, const char *name) { const grid_volume gv = vol3d(xsize, ysize, zsize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= Dielectric) real_fields = true; while (f.time() <= 3.0 && !interrupt) f.step(); h5file *file = f.open_h5file(name); if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), file_gv, file); else f.output_hdf5(component(file_c), file_gv, file); file->write("stringtest", "Hello, world!\n"); delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); char *str = file->read("stringtest"); if (strcmp(str, "Hello, world!\n")) abort("Failed to read back string test from %s...", name); // compute corner coordinate of file data vec loc0(file_gv.get_min_corner()); ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(loc0.in_direction(d)*a-.5))); if (file_gv.in_direction(d) == 0.0 && 1. - file_gv.in_direction_min(d)*a + 0.5*iloc0.in_direction(d) <= 1. + file_gv.in_direction_max(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } loc0 = gv[iloc0]; double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[3] = {1, 1, 1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 3); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", name, dataname); if (rank != expected_rank) abort("incorrect rank (%d instead of %d) in %s:%s\n", rank, expected_rank, name, dataname); vec loc(loc0.dim); for (int i0 = 0; i0 < dims[0]; ++i0) { for (int i1 = 0; i1 < dims[1]; ++i1) { for (int i2 = 0; i2 < dims[2]; ++i2) { loc.set_direction(X, loc0.in_direction(X) + i0 * gv.inva); loc.set_direction(Y, loc0.in_direction(Y) + i1 * gv.inva); loc.set_direction(Z, loc0.in_direction(Z) + i2 * gv.inva); int idx = (i0 * dims[1] + i1) * dims[2] + i2; /* Ugh, for rotational symmetries (which mix up components etc.), we can't guarantee that a component is *exactly* the same as its rotated version, and we don't know which one was written to the file. */ int cs = file_c; complex ph = 1.0; double diff = fabs(get_reim(f.get_field(file_c, loc), reim) - h5data[idx]); for (int sn = 1; sn < f.S.multiplicity(); ++sn) { vec loc2(f.S.transform(loc, sn)); int cs2 = f.S.transform(file_c, sn); complex ph2 = f.S.phase_shift(cs2, -sn); double diff2 = fabs(get_reim(f.get_field(cs2, loc2)*ph2, reim) - h5data[idx]); if (diff2 < diff) { loc = loc2; cs = cs2; ph = ph2; diff = diff2; } } double err = compare(h5data[idx], get_reim(f.get_field(cs, loc)*ph,reim), name, i0,i1,i2); err_max = max(err, err_max); data_min = min(data_min, h5data[idx]); data_max = max(data_max, h5data[idx]); } } } delete[] h5data; } file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / (max(fabs(data_min), fabs(data_max)) + 1e-16)); return 1; } bool check_2d_monitor(double eps(const vec &), double a, int splitting, symfunc Sf, component src_c, int file_c, const vec &pt, bool real_fields, const char *name) { const grid_volume gv = vol2d(xsize, ysize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= Dielectric) real_fields = true; h5file *file = f.open_h5file(name); // compute pt snapped onto dielectric grid ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(pt.in_direction(d)*a-.5))); if (1. - pt.in_direction(d)*a + 0.5*iloc0.in_direction(d) <= 1. + pt.in_direction(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } vec pt0(gv[iloc0]); const double T = 3.0; int NT = int(T / f.dt) + 2; complex *mon = new complex[NT]; while (f.time() <= T && !interrupt) { if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), volume(pt, pt), file, true); else f.output_hdf5(component(file_c), volume(pt, pt), file, true); mon[f.t] = f.get_field(file_c, pt0); f.step(); } delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[1] = {1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 2); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", file->file_name(), dataname); if (rank != 1) abort("monitor-point data is not one-dimensional"); if (dims[0] != f.t) abort("incorrect size of monitor-point data"); for (int i = 0; i < f.t; ++i) { double err = compare(h5data[i], get_reim(mon[i], reim), name, i,0,0); err_max = max(err, err_max); data_min = min(data_min, h5data[i]); data_max = max(data_max, h5data[i]); } delete[] h5data; } delete[] mon; file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / max(fabs(data_min), fabs(data_max))); return 1; } int main(int argc, char **argv) { const double a = 10.0; initialize mpi(argc, argv); int chances; quiet = true; #ifdef HAVE_HDF5 const double pad1 = 0.314159, pad2 = 0.27183, pad3 = 0.14142; volume gv_2d[4] = { volume(vec(pad1,pad2), vec(xsize-pad2,ysize-pad1)), volume(vec(-pad1,-pad2), vec(2*xsize-pad2,2*ysize-pad1)), volume(vec(pad1,pad2), vec(xsize-pad2,pad2)), volume(vec(pad1,pad2), vec(pad1,pad2)), }; char gv_2d_name[4][20] = {"plane", "plane-supercell", "line", "point"}; int gv_2d_rank[4] = {2,2,1,0}; int tm_c[5] = {Dielectric, Ez, Hy, Sx, D_EnergyDensity}; symfunc Sf2[5] = {make_identity, make_mirrorx, make_mirrory, make_mirrorxy, make_rotate4z}; char Sf2_name[5][32] = {"identity", "mirrorx", "mirrory", "mirrorxy", "rotate4z"}; double Sf2_kx[5] = {0.3, 0, 0.3, 0, 0}; double Sf2_ky[5] = {0.2, 0.2, 0, 0, 0}; #if 0 master_printf("Running initial check...\n"); if (!check_2d(funky_eps_2d, a, 1, Sf2[3], Sf2_kx[3], Sf2_ky[3], Ez, tm_c[3], gv_2d[1], 1, gv_2d_rank[1], "initial check")) return 1; #endif /* this test takes too long, so only do 1/chances of the cases, "randomly" selected */ srand(314159); /* deterministic "rand" */ chances = argc > 1 ? atoi(argv[1]) : 5; for (int iS = 0; iS < 5; ++iS) for (int splitting = 0; splitting < 5; ++splitting) for (int igv = 0; igv < 4; ++igv) for (int ic = 0; ic < 5; ++ic) for (int use_real = 1; use_real >= 0; --use_real) if (broadcast(0, rand()) % chances == 0) { char name[1024]; snprintf(name, 1024, "check_2d_tm_%s_%d_%s_%s%s", Sf2_name[iS], splitting, gv_2d_name[igv], component_name(tm_c[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_2d(funky_eps_2d, a, splitting, Sf2[iS], Sf2_kx[iS], Sf2_ky[iS], Ez, tm_c[ic], gv_2d[igv], use_real, gv_2d_rank[igv], name)) return 1; } for (int iS = 0; iS < 5; ++iS) for (int splitting = 0; splitting < 5; ++splitting) for (int ic = 0; ic < 4; ++ic) for (int use_real = 1; use_real >= 0; --use_real) if (broadcast(0, rand()) % chances == 0) { char name[1024]; snprintf(name, 1024, "check_2d_monitor_tm_%s_%d_%s%s", Sf2_name[iS], splitting, component_name(tm_c[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_2d_monitor(funky_eps_2d, a, splitting, Sf2[iS], Ez, tm_c[ic], vec(pad1,pad2), use_real, name)) return 1; } volume gv_3d[4] = { volume(vec(pad1,pad2,pad3), vec(xsize-pad2,ysize-pad1,zsize-pad3)), volume(vec(pad1,pad2,pad3), vec(xsize-pad2,ysize-pad1,pad3)), volume(vec(pad1,pad2,pad3), vec(xsize-pad2,pad2,pad3)), volume(vec(pad1,pad2,pad3), vec(pad1,pad2,pad3)), }; char gv_3d_name[4][10] = {"volume", "plane", "line", "point"}; int gv_3d_rank[4] = {3,2,1,0}; int c3d[7] = {Ex,Dielectric,Dy,Ez, Sz,H_EnergyDensity,EnergyDensity}; symfunc Sf3[3] = {make_identity, make_mirrorxy, make_rotate4z}; char Sf3_name[3][32] = {"identity", "mirrorxy", "rotate4z"}; for (int iS = 0; iS < 3; ++iS) for (int splitting = 0; splitting < 5; splitting += 3) for (int igv = 0; igv < 4; ++igv) { for (int ic = 0; ic < 1; ++ic) if (broadcast(0, rand()) % chances == 0) { bool use_real = true; char name[1024]; snprintf(name, 1024, "check_3d_ezsrc_%s_%d_%s_%s%s", Sf3_name[iS], splitting, gv_3d_name[igv], component_name(c3d[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_3d(funky_eps_3d, a, splitting, Sf3[iS], Ez, c3d[ic], gv_3d[igv], use_real, gv_3d_rank[igv], name)) return 1; } } #endif /* HAVE_HDF5 */ return 0; } meep-1.3/tests/physical.cpp0000644000175400001440000000646712506540456012732 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } int radiating_2D(const double xmax) { const double a = 10.0; const double ymax = 3.0; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, one, pml(ymax/3)); fields f(&s); double w = 0.30; double dx = 2.0; continuous_src_time src(w); f.add_point_source(Ez, src, vec(xmax/2 - dx, ymax/2)); vec p1(xmax/2 + 0*dx, ymax/2); vec p2(xmax/2 + 1*dx, ymax/2); // let the source reach steady state #if 1 f.solve_cw(1e-6); #else while (f.time() < 400) f.step(); #endif complex amp1 = f.get_field(Ez, p1); complex amp2 = f.get_field(Ez, p2); double ratio = pow(abs(amp1)/abs(amp2), 2.0) ; master_printf("Ratio is %g from (%g %g) and (%g %g)\n", ratio, real(amp1), imag(amp1), real(amp2), imag(amp2)); if (ratio > 2.12 || ratio < 1.88) abort("Failed: amp1 = (%g, %g), amp2 = (%g, %g)\n abs(amp1/amp2)^2 = %g, too far from 2.0\n", real(amp1), imag(amp1), real(amp2), imag(amp2), ratio); return 1; } int radiating_3D(const double xmax) { const double a = 10.0; const double ymax = 3.0; grid_volume gv = vol3d(xmax,ymax,ymax,a); symmetry S = mirror(Y,gv) - mirror(Z,gv); structure s(gv, one, pml(ymax/3)); fields f(&s); double w = 0.30; double dx = 2.0; continuous_src_time src(w); f.add_point_source(Ez, src, vec(xmax/2 - dx, ymax/2, ymax/2)); vec p1(xmax/2 + 0*dx, ymax/2, ymax/2); vec p2(xmax/2 + 1*dx, ymax/2, ymax/2); // let the source reach steady state #if 1 f.solve_cw(1e-3); #else while (f.time() < 400) f.step(); #endif complex amp1 = f.get_field(Ez, p1); complex amp2 = f.get_field(Ez, p2); double ratio = abs(amp1)/abs(amp2) ; master_printf("Ratio is %g from (%g %g) and (%g %g)\n", ratio, real(amp1), imag(amp1), real(amp2), imag(amp2)); if (ratio > 2.12 || ratio < 1.88) abort("Failed: amp1 = (%g, %g), amp2 = (%g, %g)\n abs(amp1/amp2) = %g, too far from 2.0\n", real(amp1), imag(amp1), real(amp2), imag(amp2), ratio); return 1; } void attempt(const char *name, int allright) { if (allright) master_printf("Passed %s\n", name); else abort("Failed %s!\n", name); } int main(int argc, char **argv) { initialize mpi(argc, argv); // quiet = true; master_printf("Trying out some physical tests...\n"); attempt("radiating source should decay spatially as 1/sqrt(r) in 2D.", radiating_2D(8.0)); attempt("radiating source should decay spatially as 1/r in 3D.", radiating_3D(7.0)); return 0; } meep-1.3/tests/bragg_transmission.cpp0000644000175400001440000001720512506540456015001 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Compute the transmission spectrum through a 4-layer 1d Bragg mirror, and compare to the result from the analytical transfer matrices. The transmission spectrum is computed via the dft_flux feature, which dynamically updates the DFTs of the fields on the flux plane as we go along. */ #include #include #include #include using namespace meep; using namespace std; const double nhi = 3, nlo = 1; const double wlo = nhi / (nlo + nhi); const int Nperiods = 4; const double zsize = 10; double eps_nlo(const vec &) { return nlo*nlo; } double eps_bragg(const vec &pt) { double z = pt.z() - zsize * 0.5; if (fabs(z)*2 > Nperiods) return nlo*nlo; else { double zi; double zf = modf(z, &zi); if (zf < 0) zf += 1; if (zf < wlo) return (nlo*nlo); else return (nhi*nhi); } } typedef complex matrix2x2[2][2]; /* multiply m by transfer matrix from n1 to n2 */ inline void byT12(matrix2x2 m, double n1, double n2) { complex m00, m01, m10, m11; double td, tod; double n12 = n1 / n2; td = 0.5 * (1 + n12); tod = 0.5 * (1 - n12); m00 = m[0][0]; m01 = m[0][1]; m10 = m[1][0]; m11 = m[1][1]; m[0][0] = m00 * td + m01 * tod; m[0][1] = m00 * tod + m01 * td; m[1][0] = m10 * td + m11 * tod; m[1][1] = m10 * tod + m11 * td; } /* multiply m by propagation matrix through dz of index n, frequency w */ inline void byP(matrix2x2 m, double n, double w, double dz) { complex p, pc; p = exp(complex(0, n * w * dz)); pc = conj(p); m[0][0] *= p; m[0][1] *= pc; m[1][0] *= p; m[1][1] *= pc; } inline double abs2(complex x) { double ax = abs(x); return ax*ax; } void bragg_transmission_analytic(double freq_min, double freq_max, int nfreq, double *T, double *R) { for (int i = 0; i < nfreq; ++i) { double omega = 2*pi * (freq_min + i * (freq_max - freq_min) / (nfreq - 1)); matrix2x2 Tm = { { 1, 0 }, { 0, 1 } }; for (int j = 0; j < Nperiods; ++j) { byT12(Tm, nlo, nhi); byP(Tm, nhi, omega, 1 - wlo); byT12(Tm, nhi, nlo); byP(Tm, nlo, omega, wlo); } complex refl = - Tm[1][0] / Tm[1][1]; T[i] = abs2(Tm[0][0] + refl * Tm[0][1]); R[i] = abs2(refl); } } void bragg_transmission(double a, double freq_min, double freq_max, int nfreq, double *T, double *R, bool use_hdf5) { const grid_volume gv = volone(zsize, a); structure s(gv, eps_bragg, pml(0.5)); fields f(&s); f.use_real_fields(); structure s0(gv, eps_nlo, pml(0.5)); fields f0(&s0); f0.use_real_fields(); vec srcpt(0.1), Tfluxpt(zsize - 0.1), Rfluxpt(0.1); gaussian_src_time src((freq_min + freq_max) * 0.5, 0.5 / fabs(freq_max - freq_min), 0, 5 / fabs(freq_max - freq_min)); f.add_point_source(Ex, src, srcpt); f0.add_point_source(Ex, src, srcpt); dft_flux ft = f.add_dft_flux_plane(Tfluxpt, freq_min, freq_max, nfreq); dft_flux fr = f.add_dft_flux_plane(Rfluxpt, freq_min, freq_max, nfreq); dft_flux ft0 = f0.add_dft_flux_plane(Tfluxpt, freq_min, freq_max, nfreq); dft_flux fr0 = f0.add_dft_flux_plane(Rfluxpt, freq_min, freq_max, nfreq); while (f0.time() < nfreq / fabs(freq_max - freq_min) / 2) f0.step(); /* we want to subtract the fields for the reflection... */ if (use_hdf5) { /* simulate a case where the normalization is done by a separate run and saved to a file */ fr0.save_hdf5(f, "flux", "reflection"); fr.load_hdf5(f, "flux", "reflection"); fr.scale_dfts(-1.0); // clean up after ourselves: delete the file h5file *ff = f.open_h5file("flux", h5file::READONLY); ff->remove(); delete ff; } else fr -= fr0; while (f.time() < nfreq / fabs(freq_max - freq_min) / 2) f.step(); double *flux = ft.flux(); double *flux0 = ft0.flux(); for (int i = 0; i < nfreq; ++i) T[i] = flux[i] / flux0[i]; delete[] flux; flux = fr.flux(); for (int i = 0; i < nfreq; ++i) R[i] = -flux[i] / flux0[i]; delete[] flux; delete[] flux0; } inline double max2(double a, double b) { return (a > b ? a : b); } inline double min2(double a, double b) { return (a < b ? a : b); } inline double max2a(double a, double b) { return max2(abs(a), abs(b)); } inline double sqr(double x) { return x*x; } /* The discretization errors tend to result in a *shift* of the spectral features more than a change in their amplitude. Because these features are very sharp (e.g. at the gap edges), it is more appropriate to compute errors via the distance from a point to the curve, rather than just the difference of the abscissae. That's what this function does. */ double distance_from_curve(int n, double dx, double ys[], double x, double y) { double d = meep::infinity; for (int i = 1; i < n; ++i) { double theta = atan2(ys[i] - ys[i-1], dx); double L = sqrt(sqr(dx) + sqr(ys[i]-ys[i-1])); double x0 = x - (i-1) * dx; double y0 = y - ys[i-1]; double x0p = x0 * cos(theta) + y0 * sin(theta); double y0p = y0 * cos(theta) - x0 * sin(theta); if (x0p < 0) d = min2(sqrt(sqr(x0) + sqr(y0)), d); else if (x0p > L) d = min2(sqrt(sqr(x-i*dx) + sqr(y-ys[i])), d); else d = min2(abs(y0p), d); } return d; } void doit(bool use_hdf5) { const int nfreq = 100; const double freq_min = 0.1, freq_max = 0.5; double *T = new double[nfreq]; double *R = new double[nfreq]; bragg_transmission(40.0, freq_min, freq_max, nfreq, T, R, use_hdf5); double *T0 = new double[nfreq]; double *R0 = new double[nfreq]; bragg_transmission_analytic(freq_min, freq_max, nfreq, T0, R0); double dfreq = (freq_max - freq_min) / (nfreq - 1); if (0) { // output transmission & reflection spectra for debugging master_printf("transmission:, freq (c/a), T, R, T0, R0\n"); for (int i = 0; i < nfreq; ++i) master_printf("transmission:, %g, %g, %g, %g, %g\n", freq_min + i * dfreq, T[i], R[i], T0[i], R0[i]); } double maxerrT = 0, maxerrR = 0; for (int i = 0; i < nfreq; ++i) { double errT = distance_from_curve(nfreq, dfreq, T0, i * dfreq, T[i]); double errR = distance_from_curve(nfreq, dfreq, R0, i * dfreq, R[i]); if (errT > maxerrT) maxerrT = errT; if (errR > maxerrR) maxerrR = errR; if (errT * sqr(freq_min / (freq_min + i*dfreq)) > 0.01) abort("large error %g at freq = %g: T = %g instead of %g\n", errT, freq_min + i*dfreq, T[i], T0[i]); if (errR * sqr(freq_min / (freq_min + i*dfreq)) > 0.01) abort("large error %g at freq = %g: R = %g instead of %g\n", errR, freq_min + i*dfreq, R[i], R0[i]); } master_printf("Done (max. err in T = %e, in R = %e)\n", maxerrT, maxerrR); delete[] R0; delete[] T0; delete[] R; delete[] T; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HDF5 doit(true); #endif doit(false); return 0; } meep-1.3/tests/known_results.cpp0000644000175400001440000001376012506540456014025 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; using namespace std; #include "config.h" double one(const vec &) { return 1.0; } double rods(const vec &r) { vec p = r; while (p.x() < -0.5) p.set_direction(X, p.x() + 1.0); while (p.x() > 0.5) p.set_direction(X, p.x() - 1.0); while (p.y() < -0.5) p.set_direction(Y, p.y() + 1.0); while (p.y() > 0.5) p.set_direction(Y, p.y() - 1.0); if (p.x()*p.x() + p.y()*p.y() < 0.3) return 12.0; return 1.0; } void compare(double b, double a, const char *n) { double thresh = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-5; if (fabs(a-b) > fabs(b)*thresh || b != b) { abort("Failed %s (%g instead of %g, relerr %0.2g)\n", n, a, b, fabs(a-b)/fabs(b)); } else { master_printf("Passed %s\n", n); } } static double dpml = 1.0; double using_pml_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps, pml(dpml)); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double x_periodic_y_pml(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps, pml(dpml, Y)); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); f.use_bloch(X, 0.1); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double x_periodic(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); f.use_bloch(X, 0.1); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double periodic_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); vec k; switch (gv.dim) { case D1: k = vec(0.3); break; case D2: k = vec(0.3,0.4); break; case D3: k = vec(0.3,0.5,0.8); break; case Dcyl: k = veccyl(0.3,0.2); break; } f.use_bloch(k); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double metallic_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double sigma(const vec &) { return 7.63; } double polariton_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); s.add_susceptibility(sigma, E_stuff, lorentzian_susceptibility(0.3, 0.1)); fields f(&s); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ex)); } double polariton_energy(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); s.add_susceptibility(sigma, E_stuff, lorentzian_susceptibility(0.3, 0.1)); fields f(&s, 0); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); return f.field_energy(); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "known_results-out"; trash_output_directory(mydirname); master_printf("Testing with some known results...\n"); const double a = 10.0; compare(-0.0894851, polariton_ex(volone(1.0, a), one), "1D polariton"); compare(0.0863443, polariton_energy(volone(1.0, a), one), "1D polariton energy"); compare(5.20605, metallic_ez(voltwo(1.0, 1.0, a), one), "1x1 metallic 2D TM"); compare(0.883776, using_pml_ez(voltwo(1.0+2*dpml, 1.0+2*dpml, a), one), "1x1 PML 2D TM"); compare(0.110425, x_periodic(voltwo(1.0, 1.0, a), one), "1x1 X periodic 2D TM"); compare(-4.78767, periodic_ez(voltwo(1.0, 3.0, a), rods), "1x1 fully periodic 2D TM rods"); compare(1.12502, periodic_ez(voltwo(1.0, 3.0, a), one), "1x1 fully periodic 2D TM"); compare(0.608815, x_periodic_y_pml(voltwo(1.0, 1.0+2*dpml, a), one), "1x1 X periodic Y PML 2D TM"); compare(-41.8057, metallic_ez(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 metallic 3D"); compare(-100.758, x_periodic(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 X periodic 3D"); compare(-101.398, x_periodic_y_pml(vol3d(1.0, 1.0+2*dpml, 1.0, a), one), "1x1x1 X periodic Y PML 3D"); compare(-103.844, periodic_ez(vol3d(1.0, 1.0, 1.0, a), rods), "1x1x1 fully periodic 3D rods"); compare(-99.1618, periodic_ez(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 fully periodic 3D"); return 0; } meep-1.3/tests/pml.cpp0000644000175400001440000003106612322770767011705 00000000000000#include #include #include using namespace meep; using namespace std; double Rasymp = 1e-15, stretch = 2.0; // PML parameters // a simple material with xy offdiagonal terms in the tensors, for testing class offdiag_material : public material_function { public: offdiag_material(double offdiag) : offdiag(offdiag) {} virtual bool has_mu() { return true; } virtual void eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL) { (void) v; (void) tol; (void) maxeval; // unused // we are returning inv(1+chi1), so we must compute the inverse // inv([1+od od; od 1+od]) = [1+od -od; -od 1+od] / (1+2*o) double detinv = 1.0 / (1 + 2 * offdiag); if (component_direction(c) == X) { chi1inv_row[0] = (1 + offdiag) * detinv; chi1inv_row[1] = -offdiag * detinv; chi1inv_row[2] = 0.0; } else if (component_direction(c) == Y) { chi1inv_row[0] = -offdiag * detinv; chi1inv_row[1] = (1 + offdiag) * detinv; chi1inv_row[2] = 0.0; } else { chi1inv_row[0] = 0.0; chi1inv_row[1] = 0.0; chi1inv_row[2] = 1.0; } } double offdiag; }; static double one(const vec &) { return 1.0; } static double notone_val = 1.0; static double notone(const vec &) { return notone_val; } static complex do_ft(fields &f, component c, const vec &pt, double freq) { complex ft = 0.0; double emax = 0; while (f.time() < f.last_source_time()) { complex fpt = f.get_field(c, pt); ft += fpt * polar(1.0, 2*pi*freq * f.time()); emax = max(emax, abs(fpt)); f.step(); } do { double emaxcur = 0; double T = f.time() + 50; while (f.time() < T) { complex fpt = f.get_field(c, pt); ft += fpt * polar(1.0, 2*pi*freq * f.time()); double e = abs(fpt); emax = max(emax, e); emaxcur = max(emaxcur, e); f.step(); } if (emaxcur < (sizeof(realnum)==sizeof(float) ? 1e-4 : 1e-6) * emax) break; if (T > 500 && emaxcur > 1e-2 * emax) abort("fields do not seem to be decaying"); } while(1); return ft; } int check_pml1d(double eps(const vec &), double conductivity) { double freq = 1.0, dpml = 1.0; double sz = 1.0 + 2*dpml; double sz2 = 1.0 + 2*dpml*2; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; vec fpt(0.5*sz - dpml - 0.1); master_printf("Checking resolution convergence of 1d PML...\n"); if (conductivity != 0) master_printf("...with conductivity %g...\n", conductivity); notone_val = conductivity; for (int i=0; i<(sizeof(realnum)==sizeof(float) ? 5 : 8); i++) { double res = 10.0 + 10.0*i; { grid_volume gv = vol1d(sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml, Rasymp, stretch)); s.set_conductivity(By, notone); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5*sz+dpml+0.1)); ft = do_ft(f, Ex, fpt, freq); } { grid_volume gv = vol1d(sz2,res); gv.center_origin(); structure s(gv, eps, pml(dpml*2, Rasymp, stretch)); s.set_conductivity(By, notone); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5*sz+dpml+0.1)); ft2 = do_ft(f, Ex, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("refl1d:, %g, %g\n", res, refl_const); if (i > 0 && refl_const > prev_refl_const * pow((res - 10)/res,8.0) * 1.1) return 1; prev_refl_const = refl_const; } master_printf("passed 1d PML check.\n"); return 0; } int check_pml2d(double eps(const vec &), component c, double conductivity, bool dispersion, double offdiag) { double freq = 1.0, dpml = 1.0, sigma0 = 1.0, omega0 = 1.0, gamma0 = 0.3; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; double sxy = 4.0 + 2*dpml; double sxy2 = 4.0 + 2*dpml*2; double res_step = 6.0; vec fpt(0.5*sxy - dpml - 0.1,0); if (c != Ez && c != Hz) abort("unimplemented component check"); double symsign = c == Ez ? 1.0 : -1.0; master_printf("Checking resolution convergence of 2d %s PML...\n", c == Ez ? "TM" : "TE"); if (conductivity != 0) master_printf("...with conductivity %g...\n", conductivity); if (dispersion) master_printf("...with dispersion\n"); if (offdiag != 0) master_printf("...with offdiag %g...\n", offdiag); offdiag_material mat(offdiag); for (int i=0; i<4; i++) { double res = 10.0 + res_step*i; { grid_volume gv = vol2d(sxy,sxy,res); gv.center_origin(); const symmetry S = offdiag != 0 ? rotate2(Z,gv) : mirror(X,gv)*symsign + mirror(Y,gv)*symsign; structure s(gv, eps, pml(dpml, Rasymp, stretch), S); if (conductivity != 0) { notone_val = conductivity; s.set_conductivity(Bx, notone); s.set_conductivity(By, notone); s.set_conductivity(Bz, notone); s.set_conductivity(Dx, notone); s.set_conductivity(Dy, notone); s.set_conductivity(Dz, notone); } if (dispersion) { notone_val = sigma0; s.add_susceptibility(notone, E_stuff, lorentzian_susceptibility(omega0, gamma0)); } if (offdiag != 0) s.set_materials(mat, false); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(c, src, gv.center()); ft = do_ft(f, c, fpt, freq); } { grid_volume gv = vol2d(sxy2,sxy2,res); gv.center_origin(); const symmetry S = offdiag != 0 ? rotate2(Z,gv) : mirror(X,gv)*symsign + mirror(Y,gv)*symsign; structure s(gv, eps, pml(dpml*2, Rasymp, stretch), S); if (conductivity != 0) { notone_val = conductivity; s.set_conductivity(Bx, notone); s.set_conductivity(By, notone); s.set_conductivity(Bz, notone); s.set_conductivity(Dx, notone); s.set_conductivity(Dy, notone); s.set_conductivity(Dz, notone); } if (dispersion) { notone_val = sigma0; s.add_susceptibility(notone, E_stuff, lorentzian_susceptibility(omega0, gamma0)); } if (offdiag != 0) s.set_materials(mat, false); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(c, src, gv.center()); ft2 = do_ft(f, c, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("refl2d:, %g, %g\n", res, refl_const); if (i > 0 && refl_const > prev_refl_const * pow((res - res_step)/res, offdiag != 0 ? 6.0 : 8.0) * 1.2) return 1; prev_refl_const = refl_const; } master_printf("passed 2d %s PML check.\n", c == Ez ? "TM" : "TE"); return 0; } /* The cylindrical case actually shouldn't have a reflection that goes to zero with increasing resolution - we implement only a "quasi-PML" for cylindrical coordinates, which is basically the PML for Cartesian coordinates copied over directly to the cylindrical case, rather than doing a proper coordinate stretching of r. This is not a practical issue because, rather than increasing the resolution, in practice you increase the PML thickness to eliminate reflections, and increasing a quasi-PML thickness makes the reflection vanish by the usual adiabatic theorem. Because of that, we don't actually run this check as part of the test suite, but I'll leave the code here for future study of the cylindrical PML. */ int check_pmlcyl(double eps(const vec &)) { double freq = 1.0, dpml = 1.0; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; double sr = 5.0 + dpml, sz = 1.0 + 2*dpml; double sr2 = 5.0 + dpml*2, sz2 = 1.0 + 2*dpml*2; vec fpt = veccyl(sr - dpml - 0.1,0); double res_step = 6.0; master_printf("Checking resolution convergence of cylindrical PML...\n"); for (int i=0; i<5; i++) { double res = 10.0 + res_step*i; master_printf(" checking cylindrical resolution %g...\n", res); { grid_volume gv = volcyl(sr,sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml, Rasymp, stretch)); fields f(&s, 0); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.1,0.1)); ft = do_ft(f, Ez, fpt, freq); } { grid_volume gv = volcyl(sr2,sz2,res); gv.center_origin(); structure s(gv, eps, pml(dpml*2, Rasymp, stretch)); fields f(&s, 0); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.1,0.1)); ft2 = do_ft(f, Ez, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("reflcyl:, %g, %g\n", res, refl_const); prev_refl_const = refl_const; } master_printf("passed cylindrical PML check.\n"); return 0; } int pml1d_scaling(double eps(const vec &)) { double res = 20, freq = 1.0, dpml = 0; complex prev_ft = 0.0, ft = 0.0; double refl_const = 0.0, prev_refl_const = 0.0; master_printf("Checking thickness convergence of 1d PML...\n"); for (int i=0; i < (sizeof(realnum)==sizeof(float) ? 5 : 7); i++) { dpml = pow(2.0,(double)i); double sz = 2*dpml + 10.0 + dpml; prev_ft = ft; grid_volume gv = vol1d(sz,res); structure s(gv, eps, (pml(2*dpml,Z,Low, Rasymp, stretch) + pml(dpml,Z,High, Rasymp, stretch)) * 1.5); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(2*dpml+0.1)); ft = do_ft(f, Ex, vec(sz - dpml - 0.1), freq); if (i > 0) { refl_const = pow(abs(ft - prev_ft),2.0) / pow(abs(prev_ft),2.0); master_printf("refl1d:, %g, %g\n", dpml, refl_const); if (refl_const > (1e-9)*pow(2/dpml,6.0) || refl_const < (1e-10)*pow(2/dpml, 6.0)) return 1; if (i > 1) { master_printf("ratio R(%g)/R(%g) * 2^6 = %g\n", dpml, dpml/2, (refl_const/prev_refl_const) * 64.0); if ((refl_const/prev_refl_const) * 64.0 > 1.1) return 1; } prev_refl_const = refl_const; } } master_printf("pml scales correctly with length.\n"); return 0; } int pmlcyl_scaling(double eps(const vec &), int m) { double res = 10, freq = 1.0, dpml = 0; complex prev_ft = 0.0, ft = 0.0; double refl_const = 0.0, prev_refl_const = 0.0; master_printf("Checking thickness convergence of cylindrical PML for m=%d...\n", m); for (int i=0; i < 3; i++) { dpml = pow(2.0,(double)i); double sr = 5.0 + dpml, sz = dpml + 5.0 + dpml; prev_ft = ft; grid_volume gv = volcyl(sr,sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml, Rasymp, stretch)); fields f(&s, m); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.5 * (sr - dpml), 0.1)); ft = do_ft(f, Ez, veccyl(sr - dpml - 0.1,0), freq); if (i > 0) { refl_const = pow(abs(ft - prev_ft),2.0) / pow(abs(prev_ft),2.0); master_printf("reflcyl:, %g, %g\n", dpml, refl_const); if (refl_const > (1e-5)*pow(2/dpml,6.0) || refl_const < (1e-8)*pow(2/dpml, 6.0)) return 1; if (i > 1) { master_printf("ratio R(%g)/R(%g) * 2^6 = %g\n", dpml, dpml/2, (refl_const/prev_refl_const) * 64.0); if ((refl_const/prev_refl_const) * 64.0 > 1.1) return 1; } prev_refl_const = refl_const; } } master_printf("pml scales correctly with length.\n"); return 0; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Running PML tests...\n"); if (check_pml1d(one, 0)) abort("not a pml in 1d."); if (check_pml1d(one, 10.0)) abort("not a pml in 1d + conductivity."); if (check_pml2d(one,Ez,0,false,0)) abort("not a pml in 2d TM."); // if (check_pml2d(one,Ez,1,false,0)) abort("not a pml in 2d TM + conduct."); // if (check_pml2d(one,Hz,0,false,0)) abort("not a pml in 2d TE."); if (check_pml2d(one,Hz,1,false,0)) abort("not a pml in 2d TE + conduct."); // if (check_pml2d(one,Ez,0,true,0)) abort("not a pml in 2d TM + dispersion."); if (check_pml2d(one,Hz,0,true,0)) abort("not a pml in 2d TE + dispersion."); if (check_pml2d(one,Ez,0,false,0.5)) abort("not a pml in 2d TM + offdiag."); if (check_pml2d(one,Hz,0,false,0.5)) abort("not a pml in 2d TE + offdiag."); // if (check_pmlcyl(one)) abort("not a pml in cylincrical co-ordinates."); if (pml1d_scaling(one)) abort("pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 0)) abort("m=0 cylindrical pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 1)) abort("m=1 cylindrical pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 2)) abort("m=2 cylindrical pml doesn't scale properly with length."); return 0; } meep-1.3/tests/bench.cpp0000644000175400001440000002275112506540456012167 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } static double width = 20.0; double bump(const vec &pt) { return (fabs(pt.z()-50.0) > width)?1.0:12.0; } struct bench { double time; // In seconds. double gridsteps; }; bench bench_periodic(const double rmax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = (zmax==0.0)?a*rmax:a*a*rmax*zmax; const double ttot = 5.0 + 1e5/gridpts; const int m = 0; grid_volume gv = volcyl(rmax,zmax,a); structure s(gv, eps); fields f(&s, m); f.use_bloch(0.0); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); double start = wall_time(); while (f.time() < ttot) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_flux_1d(const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*zmax; const double ttot = 10.0 + 1e5/zmax; grid_volume gv = volone(zmax,a); structure s(gv, eps, pml(zmax/6)); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.7, 2.5, 0.0, 3.0, vec(zmax/2+0.3), 1.0); flux_vol *left = f.add_flux_plane(vec(zmax/3.0), vec(zmax/3.0)); flux_vol *right = f.add_flux_plane(vec(zmax*2.0/3.0), vec(zmax*2.0/3.0)); while (f.time() <= f.last_source_time()) f.step(); grid_volume mid = volone(zmax/3,a); mid.set_origin(vec(zmax/3)); double flux_energy=0.0; double start = wall_time(); while (f.time() < ttot) { f.step(); flux_energy += f.dt*(right->flux() - left->flux()); } bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.8, 0.7, 0.0, 4.0, vec(0.431, 0.2)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } const double te_tm_2d_time = 2e5; bench bench_2d_tm_nonlinear(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); s.set_chi3(eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_tm(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_te(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.6, 0.6, 0.0, 4.0, vec(0.7, 0.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_te_nonlinear(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); s.set_chi3(eps); fields f(&s); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.6, 0.6, 0.0, 4.0, vec(0.7, 0.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } #define showbench(name, bb) { \ bench b = bb; \ master_printf("bench:, %s, %g, %g\n", \ name, b.time, b.time*1e6/b.gridsteps); \ } // 3D benchmarks: inline double max(double a, double b) { return (a>b)?a:b; } bench bench_3d_periodic(const double xmax, const double ymax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*a*max(xmax,1/a)*max(ymax,1/a)*max(zmax,1/a); const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = vol3d(xmax,ymax,zmax,a); structure s(gv, eps); fields f(&s); if (xmax==0) f.use_bloch(X,0.0); if (ymax==0) f.use_bloch(Y,0.0); if (ymax==0) f.use_bloch(Z,0.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(xmax*.5, ymax*.5, zmax*.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_3d(const double xmax, const double ymax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*a*xmax*ymax*zmax; const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = vol3d(xmax,ymax,zmax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(xmax*.5, ymax*.5, zmax*.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Benchmarking with %d processor%s...\n", count_processors(), count_processors() > 1 ? "s" : ""); master_printf("bench:, test, total time (s), normalized time (s/Mgs)\n"); showbench("Periodic 6x4 ", bench_periodic(6.0, 4.0, one)); showbench("Periodic 12x1", bench_periodic(12.0, 1.0, one)); showbench("Periodic 1x12", bench_periodic(1.0, 12.0, one)); showbench("Periodic 12x0", bench_periodic(12.0, 0.0, one)); showbench("Periodic 12x12", bench_periodic(12.0, 12.0, one)); width = 20.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); width = 10.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); width = 300.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); showbench("3D 1x1x10", bench_3d(1.0, 1.0, 10.0, one)); showbench("3D 10x1x1", bench_3d(10.0, 1.0, 1.0, one)); showbench("3D 1x1x1 ", bench_3d(1.0, 1.0, 1.0, one)); showbench("3D 3x3x3 ", bench_3d(3.0, 3.0, 3.0, one)); showbench("3D 10x3x0", bench_3d_periodic(10.0, 3.0, 0.0, one)); showbench("3D 0x3x10", bench_3d_periodic(0.0, 3.0, 10.0, one)); showbench("2D 6x4 ", bench_2d(6.0, 4.0, one)); showbench("2D 12x12 ", bench_2d(12.0, 12.0, one)); showbench("2D 12x12 ", bench_2d(12.0, 12.0, one)); showbench("2D TM 6x4 nonlinear ", bench_2d_tm_nonlinear(6.0, 4.0, one)); showbench("2D TM 6x4 ", bench_2d_tm(6.0, 4.0, one)); showbench("2D TM 12x12 ", bench_2d_tm(12.0, 12.0, one)); showbench("2D TE 2x2 nonlinear ", bench_2d_te_nonlinear(2.0, 2.0, one)); showbench("2D TE 2x2 ", bench_2d_te(2.0, 2.0, one)); showbench("2D TE 10x11 nonlinear ", bench_2d_te_nonlinear(10.0, 11.0, one)); showbench("2D TE 10x11 ", bench_2d_te(10.0, 11.0, one)); master_printf("\nnote: 1 Mgs = 1 million grid point time steps\n"); return 0; } meep-1.3/tests/one_dimensional.cpp0000644000175400001440000001330312506540456014244 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-10; #else static const double tol = 1e-11, thresh = 1e-12; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g, time %g\n", p.z(), f1.time()); return 0; } } } return 1; } int test_simple_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 170.0; grid_volume gv = volone(6.0,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Trying splitting into %d chunks...\n", splitting); fields f(&s); f.use_bloch(0.0); f.add_point_source(Hy, 0.7, 2.5, 0.0, 4.0, vec(0.5), 1.0); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401), 1.0); fields f1(&s1); f1.use_bloch(0.0); f1.add_point_source(Hy, 0.7, 2.5, 0.0, 4.0, vec(0.5), 1.0); f1.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401), 1.0); if (!compare(f1.count_volume(Ex), f.count_volume(Ex), "grid_volume")) return 0; double field_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 ))) return 0; if (!compare_point(f, f1, vec(0.46 ))) return 0; if (!compare_point(f, f1, vec(1.0 ))) return 0; if (!compare_point(f, f1, vec(0.01 ))) return 0; if (!compare_point(f, f1, vec(0.601))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } complex checkers(const vec &pt) { const double thez = pt.z()+0.00001; int z = (int) (thez*5.0); int zz = (int) (thez*10.0); if (z & 1) return cos(thez); if (zz & 1) return 2.0; return 1.0; } int test_pattern(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = volone(6.0,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Trying test pattern with %d chunks...\n", splitting); fields f(&s); f.use_bloch(0.0); fields f1(&s1); f1.use_bloch(0.0); if (!compare(f1.count_volume(Ex), f.count_volume(Ex), "grid_volume")) return 0; f1.initialize_field(Hy, checkers); f.initialize_field(Hy, checkers); f.step(); f1.step(); if (!compare_point(f, f1, vec(27.99))) return 0; if (!compare_point(f, f1, vec(42.01))) return 0; if (!compare_point(f, f1, vec(0.751))) return 0; if (!compare_point(f, f1, vec(0.01 ))) return 0; if (!compare_point(f, f1, vec(1.0 ))) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "one_dimensional-out"; master_printf("Testing one dimension under different splittings...\n"); for (int s=2;s<7;s++) if (!test_pattern(one, s, mydirname)) abort("error in test_pattern\n"); for (int s=2;s<7;s++) if (!test_simple_periodic(one, s, mydirname)) abort("error in test_simple_periodic\n"); return 0; } meep-1.3/tests/aniso_disp.cpp0000644000175400001440000001141012506540456013226 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Anisotropic dispersion test program */ /* For comparison, we solve for the dispersion relation analytically in Matlab using the fsolve command to solve the nonlinear eigenproblem. The Matlab code is as follows. function result = detMwk(f,k) sigE = [ 2.92724 0.45948 0.70117; 0.45948 2.89689 0.45083; 0.70117 0.45083 2.17378; ]; epsinf = [ 2.41104 0.48709 0.41226; 0.48709 2.43172 1.62060; 0.41226 1.62060 3.61498; ]; sigH = 0; muinf = [ 1 0 0; 0 1 0; 0 0 1; ]; f0 = 1.1; g0 = 1e-5; epsinv = inv(epsinf + ((f0^2)/(f0^2 - f^2 -i*f*g0))*sigE); muinv = inv(muinf + ((f0^2)/(f0^2 - f^2 -i*f*g0))*sigH); E = [ 0 0; 1 0; 0 1; ]; kx = k * [ 0 0 0; 0 0 -1; 0 1 0; ]; result = det(E' * (f.^2*eye(3) + kx * muinv * kx * epsinv) * E); endfunction k = 0.813; w1 = fsolve(@(w)detMwk(w,k),0.9); w2 = fsolve(@(w)detMwk(w,k),w1-0.1); */ #include using namespace meep; using namespace std; class anisodisp_material : public material_function { public: virtual void eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL) { (void) v; (void) tol; (void) maxeval; // unused if (component_direction(c) == X) { chi1inv_row[0] = 0.432818; chi1inv_row[1] = -0.076724; chi1inv_row[2] = -0.014964; } else if (component_direction(c) == Y) { chi1inv_row[0] = -0.076724; chi1inv_row[1] = 0.600041; chi1inv_row[2] = -0.260249; } else { chi1inv_row[0] = -0.014964; chi1inv_row[1] = -0.260249; chi1inv_row[2] = 0.395003; } } virtual void sigma_row(component c, double sigrow[3], const vec &r) { (void) r; // unused if (component_direction(c) == X) { sigrow[0] = 2.92724; sigrow[1] = 0.45948; sigrow[2] = 0.70117; } else if (component_direction(c) == Y) { sigrow[0] = 0.45948; sigrow[1] = 2.89689; sigrow[2] = 0.45083; } else { sigrow[0] = 0.70117; sigrow[1] = 0.45083; sigrow[2] = 2.17378; } } }; int main(int argc, char **argv) { initialize mpi(argc, argv); bool ok = true; // we can only use one process for this 1-pixel simulation if (0 == divide_parallel_processes(count_processors())) { quiet = true; const double res = 200; grid_volume gv = vol3d(0,0,0, res); gv.center_origin(); anisodisp_material anisodispmat; structure s(gv, anisodispmat); s.add_susceptibility(anisodispmat, E_stuff, lorentzian_susceptibility(1.1,1e-5)); fields f(&s); f.use_bloch(vec(0.813,0,0)); f.add_point_source(Ez, 0.5, 1.0, 0.0, 4.0, vec(0,0,0)); double T = f.last_source_time(); int iT = T / f.dt; while (f.t < iT) { if (f.t % (iT / 10) == 0) master_printf("%g%% done with source\n", f.time()/T * 100); f.step(); } double T2 = 200; int iT2 = T2 / f.dt; complex *vals = new complex[iT2]; while (f.t - iT < iT2) { if ((f.t - iT) % (iT2 / 10) == 0) master_printf("%g%% done with harminv\n", (f.t - iT) * 100.0 / iT2); vals[f.t - iT] = f.get_field(Ez, vec(0.,0.,0.)); f.step(); } complex amps[8]; double freqs_re[8], freqs_im[8]; master_printf("done with timestepping, running harminv...\n"); int num = do_harminv(vals, iT2, f.dt, 0.0, 1.0, 8, amps, freqs_re, freqs_im); // compute the error compared to analytical solution int i0 = 0; for (int i=0;i&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = aniso_disp$(EXEEXT) bench$(EXEEXT) \ bragg_transmission$(EXEEXT) convergence_cyl_waveguide$(EXEEXT) \ cylindrical$(EXEEXT) flux$(EXEEXT) harmonics$(EXEEXT) \ integrate$(EXEEXT) known_results$(EXEEXT) near2far$(EXEEXT) \ one_dimensional$(EXEEXT) physical$(EXEEXT) \ stress_tensor$(EXEEXT) symmetry$(EXEEXT) three_d$(EXEEXT) \ two_dimensional$(EXEEXT) 2D_convergence$(EXEEXT) \ h5test$(EXEEXT) pml$(EXEEXT) TESTS = aniso_disp$(EXEEXT) bench$(EXEEXT) bragg_transmission$(EXEEXT) \ convergence_cyl_waveguide$(EXEEXT) cylindrical$(EXEEXT) \ flux$(EXEEXT) harmonics$(EXEEXT) integrate$(EXEEXT) \ known_results$(EXEEXT) near2far$(EXEEXT) \ one_dimensional$(EXEEXT) physical$(EXEEXT) \ stress_tensor$(EXEEXT) symmetry$(EXEEXT) three_d$(EXEEXT) \ two_dimensional$(EXEEXT) 2D_convergence$(EXEEXT) \ h5test$(EXEEXT) pml$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_2D_convergence_OBJECTS = 2D_convergence.$(OBJEXT) 2D_convergence_OBJECTS = $(am_2D_convergence_OBJECTS) 2D_convergence_DEPENDENCIES = $(LIBMEEP) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_aniso_disp_OBJECTS = aniso_disp.$(OBJEXT) aniso_disp_OBJECTS = $(am_aniso_disp_OBJECTS) aniso_disp_DEPENDENCIES = $(LIBMEEP) am_bench_OBJECTS = bench.$(OBJEXT) bench_OBJECTS = $(am_bench_OBJECTS) bench_DEPENDENCIES = $(LIBMEEP) am_bragg_transmission_OBJECTS = bragg_transmission.$(OBJEXT) bragg_transmission_OBJECTS = $(am_bragg_transmission_OBJECTS) bragg_transmission_DEPENDENCIES = $(LIBMEEP) am_convergence_cyl_waveguide_OBJECTS = \ convergence_cyl_waveguide.$(OBJEXT) convergence_cyl_waveguide_OBJECTS = \ $(am_convergence_cyl_waveguide_OBJECTS) convergence_cyl_waveguide_DEPENDENCIES = $(LIBMEEP) am_cylindrical_OBJECTS = cylindrical.$(OBJEXT) cylindrical_OBJECTS = $(am_cylindrical_OBJECTS) cylindrical_DEPENDENCIES = $(LIBMEEP) am_flux_OBJECTS = flux.$(OBJEXT) flux_OBJECTS = $(am_flux_OBJECTS) flux_DEPENDENCIES = $(LIBMEEP) am_h5test_OBJECTS = h5test.$(OBJEXT) h5test_OBJECTS = $(am_h5test_OBJECTS) h5test_DEPENDENCIES = $(LIBMEEP) am_harmonics_OBJECTS = harmonics.$(OBJEXT) harmonics_OBJECTS = $(am_harmonics_OBJECTS) harmonics_DEPENDENCIES = $(LIBMEEP) am_integrate_OBJECTS = integrate.$(OBJEXT) integrate_OBJECTS = $(am_integrate_OBJECTS) integrate_DEPENDENCIES = $(LIBMEEP) am_known_results_OBJECTS = known_results.$(OBJEXT) known_results_OBJECTS = $(am_known_results_OBJECTS) known_results_DEPENDENCIES = $(LIBMEEP) am_near2far_OBJECTS = near2far.$(OBJEXT) near2far_OBJECTS = $(am_near2far_OBJECTS) near2far_DEPENDENCIES = $(LIBMEEP) am_one_dimensional_OBJECTS = one_dimensional.$(OBJEXT) one_dimensional_OBJECTS = $(am_one_dimensional_OBJECTS) one_dimensional_DEPENDENCIES = $(LIBMEEP) am_physical_OBJECTS = physical.$(OBJEXT) physical_OBJECTS = $(am_physical_OBJECTS) physical_DEPENDENCIES = $(LIBMEEP) am_pml_OBJECTS = pml.$(OBJEXT) pml_OBJECTS = $(am_pml_OBJECTS) pml_DEPENDENCIES = $(LIBMEEP) am_stress_tensor_OBJECTS = stress_tensor.$(OBJEXT) stress_tensor_OBJECTS = $(am_stress_tensor_OBJECTS) stress_tensor_DEPENDENCIES = $(LIBMEEP) am_symmetry_OBJECTS = symmetry.$(OBJEXT) symmetry_OBJECTS = $(am_symmetry_OBJECTS) symmetry_DEPENDENCIES = $(LIBMEEP) am_three_d_OBJECTS = three_d.$(OBJEXT) three_d_OBJECTS = $(am_three_d_OBJECTS) three_d_DEPENDENCIES = $(LIBMEEP) am_two_dimensional_OBJECTS = two_dimensional.$(OBJEXT) two_dimensional_OBJECTS = $(am_two_dimensional_OBJECTS) two_dimensional_DEPENDENCIES = $(LIBMEEP) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(2D_convergence_SOURCES) $(aniso_disp_SOURCES) \ $(bench_SOURCES) $(bragg_transmission_SOURCES) \ $(convergence_cyl_waveguide_SOURCES) $(cylindrical_SOURCES) \ $(flux_SOURCES) $(h5test_SOURCES) $(harmonics_SOURCES) \ $(integrate_SOURCES) $(known_results_SOURCES) \ $(near2far_SOURCES) $(one_dimensional_SOURCES) \ $(physical_SOURCES) $(pml_SOURCES) $(stress_tensor_SOURCES) \ $(symmetry_SOURCES) $(three_d_SOURCES) \ $(two_dimensional_SOURCES) DIST_SOURCES = $(2D_convergence_SOURCES) $(aniso_disp_SOURCES) \ $(bench_SOURCES) $(bragg_transmission_SOURCES) \ $(convergence_cyl_waveguide_SOURCES) $(cylindrical_SOURCES) \ $(flux_SOURCES) $(h5test_SOURCES) $(harmonics_SOURCES) \ $(integrate_SOURCES) $(known_results_SOURCES) \ $(near2far_SOURCES) $(one_dimensional_SOURCES) \ $(physical_SOURCES) $(pml_SOURCES) $(stress_tensor_SOURCES) \ $(symmetry_SOURCES) $(three_d_SOURCES) \ $(two_dimensional_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MPIRUN = @MPIRUN@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SRC = aniso_disp.cpp bench.cpp bragg_transmission.cpp \ convergence_cyl_waveguide.cpp cylindrical.cpp flux.cpp harmonics.cpp \ integrate.cpp known_results.cpp near2far.cpp one_dimensional.cpp \ physical.cpp stress_tensor.cpp symmetry.cpp three_d.cpp \ two_dimensional.cpp 2D_convergence.cpp h5test.cpp pml.cpp EXTRA_DIST = $(SRC) OBJ = $(SRC:.cpp=.o) DAC = $(SRC:.cpp=.dac) DONE = $(SRC:.cpp=.done) LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la AM_CPPFLAGS = -I$(top_srcdir)/src .SUFFIXES = .dac .done aniso_disp_SOURCES = aniso_disp.cpp aniso_disp_LDADD = $(LIBMEEP) bench_SOURCES = bench.cpp bench_LDADD = $(LIBMEEP) bragg_transmission_SOURCES = bragg_transmission.cpp bragg_transmission_LDADD = $(LIBMEEP) convergence_cyl_waveguide_SOURCES = convergence_cyl_waveguide.cpp convergence_cyl_waveguide_LDADD = $(LIBMEEP) cylindrical_SOURCES = cylindrical.cpp cylindrical_LDADD = $(LIBMEEP) flux_SOURCES = flux.cpp flux_LDADD = $(LIBMEEP) harmonics_SOURCES = harmonics.cpp harmonics_LDADD = $(LIBMEEP) integrate_SOURCES = integrate.cpp integrate_LDADD = $(LIBMEEP) known_results_SOURCES = known_results.cpp known_results_LDADD = $(LIBMEEP) near2far_SOURCES = near2far.cpp near2far_LDADD = $(LIBMEEP) one_dimensional_SOURCES = one_dimensional.cpp one_dimensional_LDADD = $(LIBMEEP) physical_SOURCES = physical.cpp physical_LDADD = $(LIBMEEP) stress_tensor_SOURCES = stress_tensor.cpp stress_tensor_LDADD = $(LIBMEEP) symmetry_SOURCES = symmetry.cpp symmetry_LDADD = $(LIBMEEP) three_d_SOURCES = three_d.cpp three_d_LDADD = $(LIBMEEP) two_dimensional_SOURCES = two_dimensional.cpp two_dimensional_LDADD = $(LIBMEEP) 2D_convergence_SOURCES = 2D_convergence.cpp 2D_convergence_LDADD = $(LIBMEEP) h5test_SOURCES = h5test.cpp h5test_LDADD = $(LIBMEEP) pml_SOURCES = pml.cpp pml_LDADD = $(LIBMEEP) LOG_COMPILER = $(RUNCODE) all: all-am .SUFFIXES: .SUFFIXES: .cpp .dac .done .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list 2D_convergence$(EXEEXT): $(2D_convergence_OBJECTS) $(2D_convergence_DEPENDENCIES) $(EXTRA_2D_convergence_DEPENDENCIES) @rm -f 2D_convergence$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(2D_convergence_OBJECTS) $(2D_convergence_LDADD) $(LIBS) aniso_disp$(EXEEXT): $(aniso_disp_OBJECTS) $(aniso_disp_DEPENDENCIES) $(EXTRA_aniso_disp_DEPENDENCIES) @rm -f aniso_disp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(aniso_disp_OBJECTS) $(aniso_disp_LDADD) $(LIBS) bench$(EXEEXT): $(bench_OBJECTS) $(bench_DEPENDENCIES) $(EXTRA_bench_DEPENDENCIES) @rm -f bench$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bench_OBJECTS) $(bench_LDADD) $(LIBS) bragg_transmission$(EXEEXT): $(bragg_transmission_OBJECTS) $(bragg_transmission_DEPENDENCIES) $(EXTRA_bragg_transmission_DEPENDENCIES) @rm -f bragg_transmission$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bragg_transmission_OBJECTS) $(bragg_transmission_LDADD) $(LIBS) convergence_cyl_waveguide$(EXEEXT): $(convergence_cyl_waveguide_OBJECTS) $(convergence_cyl_waveguide_DEPENDENCIES) $(EXTRA_convergence_cyl_waveguide_DEPENDENCIES) @rm -f convergence_cyl_waveguide$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(convergence_cyl_waveguide_OBJECTS) $(convergence_cyl_waveguide_LDADD) $(LIBS) cylindrical$(EXEEXT): $(cylindrical_OBJECTS) $(cylindrical_DEPENDENCIES) $(EXTRA_cylindrical_DEPENDENCIES) @rm -f cylindrical$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(cylindrical_OBJECTS) $(cylindrical_LDADD) $(LIBS) flux$(EXEEXT): $(flux_OBJECTS) $(flux_DEPENDENCIES) $(EXTRA_flux_DEPENDENCIES) @rm -f flux$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(flux_OBJECTS) $(flux_LDADD) $(LIBS) h5test$(EXEEXT): $(h5test_OBJECTS) $(h5test_DEPENDENCIES) $(EXTRA_h5test_DEPENDENCIES) @rm -f h5test$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(h5test_OBJECTS) $(h5test_LDADD) $(LIBS) harmonics$(EXEEXT): $(harmonics_OBJECTS) $(harmonics_DEPENDENCIES) $(EXTRA_harmonics_DEPENDENCIES) @rm -f harmonics$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(harmonics_OBJECTS) $(harmonics_LDADD) $(LIBS) integrate$(EXEEXT): $(integrate_OBJECTS) $(integrate_DEPENDENCIES) $(EXTRA_integrate_DEPENDENCIES) @rm -f integrate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(integrate_OBJECTS) $(integrate_LDADD) $(LIBS) known_results$(EXEEXT): $(known_results_OBJECTS) $(known_results_DEPENDENCIES) $(EXTRA_known_results_DEPENDENCIES) @rm -f known_results$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(known_results_OBJECTS) $(known_results_LDADD) $(LIBS) near2far$(EXEEXT): $(near2far_OBJECTS) $(near2far_DEPENDENCIES) $(EXTRA_near2far_DEPENDENCIES) @rm -f near2far$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(near2far_OBJECTS) $(near2far_LDADD) $(LIBS) one_dimensional$(EXEEXT): $(one_dimensional_OBJECTS) $(one_dimensional_DEPENDENCIES) $(EXTRA_one_dimensional_DEPENDENCIES) @rm -f one_dimensional$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(one_dimensional_OBJECTS) $(one_dimensional_LDADD) $(LIBS) physical$(EXEEXT): $(physical_OBJECTS) $(physical_DEPENDENCIES) $(EXTRA_physical_DEPENDENCIES) @rm -f physical$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(physical_OBJECTS) $(physical_LDADD) $(LIBS) pml$(EXEEXT): $(pml_OBJECTS) $(pml_DEPENDENCIES) $(EXTRA_pml_DEPENDENCIES) @rm -f pml$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pml_OBJECTS) $(pml_LDADD) $(LIBS) stress_tensor$(EXEEXT): $(stress_tensor_OBJECTS) $(stress_tensor_DEPENDENCIES) $(EXTRA_stress_tensor_DEPENDENCIES) @rm -f stress_tensor$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(stress_tensor_OBJECTS) $(stress_tensor_LDADD) $(LIBS) symmetry$(EXEEXT): $(symmetry_OBJECTS) $(symmetry_DEPENDENCIES) $(EXTRA_symmetry_DEPENDENCIES) @rm -f symmetry$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(symmetry_OBJECTS) $(symmetry_LDADD) $(LIBS) three_d$(EXEEXT): $(three_d_OBJECTS) $(three_d_DEPENDENCIES) $(EXTRA_three_d_DEPENDENCIES) @rm -f three_d$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(three_d_OBJECTS) $(three_d_LDADD) $(LIBS) two_dimensional$(EXEEXT): $(two_dimensional_OBJECTS) $(two_dimensional_DEPENDENCIES) $(EXTRA_two_dimensional_DEPENDENCIES) @rm -f two_dimensional$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(two_dimensional_OBJECTS) $(two_dimensional_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/2D_convergence.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aniso_disp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bragg_transmission.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence_cyl_waveguide.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cylindrical.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/harmonics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/known_results.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/near2far.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/one_dimensional.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physical.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stress_tensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmetry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/three_d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/two_dimensional.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? aniso_disp.log: aniso_disp$(EXEEXT) @p='aniso_disp$(EXEEXT)'; \ b='aniso_disp'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) bench.log: bench$(EXEEXT) @p='bench$(EXEEXT)'; \ b='bench'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) bragg_transmission.log: bragg_transmission$(EXEEXT) @p='bragg_transmission$(EXEEXT)'; \ b='bragg_transmission'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) convergence_cyl_waveguide.log: convergence_cyl_waveguide$(EXEEXT) @p='convergence_cyl_waveguide$(EXEEXT)'; \ b='convergence_cyl_waveguide'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) cylindrical.log: cylindrical$(EXEEXT) @p='cylindrical$(EXEEXT)'; \ b='cylindrical'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) flux.log: flux$(EXEEXT) @p='flux$(EXEEXT)'; \ b='flux'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) harmonics.log: harmonics$(EXEEXT) @p='harmonics$(EXEEXT)'; \ b='harmonics'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) integrate.log: integrate$(EXEEXT) @p='integrate$(EXEEXT)'; \ b='integrate'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) known_results.log: known_results$(EXEEXT) @p='known_results$(EXEEXT)'; \ b='known_results'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) near2far.log: near2far$(EXEEXT) @p='near2far$(EXEEXT)'; \ b='near2far'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) one_dimensional.log: one_dimensional$(EXEEXT) @p='one_dimensional$(EXEEXT)'; \ b='one_dimensional'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) physical.log: physical$(EXEEXT) @p='physical$(EXEEXT)'; \ b='physical'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) stress_tensor.log: stress_tensor$(EXEEXT) @p='stress_tensor$(EXEEXT)'; \ b='stress_tensor'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) symmetry.log: symmetry$(EXEEXT) @p='symmetry$(EXEEXT)'; \ b='symmetry'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) three_d.log: three_d$(EXEEXT) @p='three_d$(EXEEXT)'; \ b='three_d'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) two_dimensional.log: two_dimensional$(EXEEXT) @p='two_dimensional$(EXEEXT)'; \ b='two_dimensional'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) 2D_convergence.log: 2D_convergence$(EXEEXT) @p='2D_convergence$(EXEEXT)'; \ b='2D_convergence'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) h5test.log: h5test$(EXEEXT) @p='h5test$(EXEEXT)'; \ b='h5test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) pml.log: pml$(EXEEXT) @p='pml$(EXEEXT)'; \ b='pml'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am # Note: this requires GNU make .o.dac: $(CXXLINK) $< $(LIBMEEP) $(LIBS) $(DAC): $(LIBMEEP) .dac.done: $(RUNCODE) ./$< touch $@ benchmark: bench $(RUNCODE) ./bench dac: $(DAC) clean-local:: rm -f *.o *.dac debug_out_* *.done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-1.3/tests/convergence_cyl_waveguide.cpp0000644000175400001440000001422412322771035016304 00000000000000#include #include using namespace meep; #include "config.h" using namespace std; double eps(const vec &pt) { return ((pt.r() < 0.5+1e-6) ? 9.0 : 1.0); } #define MINRES 10 #define MAXRES 25 #define RESSTEP 3 // should be odd int find_exponent(double a_mean, double a_meansqr, double a2_mean, double a2_meansqr, const char *name) { // Verdict on convergence double a_sigma, a2_sigma; a_sigma = sqrt(a_meansqr - a_mean*a_mean); a2_sigma = sqrt(a2_meansqr - a2_mean*a2_mean); master_printf("%s a's: ", name); if (a2_sigma/a2_mean < 0.15) { master_printf("converged as %3.1e / (a*a)\n", a_mean); return 2; } else if (a_sigma/a_mean < 0.15) { master_printf("converged as %3.1e / a\n", a_mean); return 1; } else { master_printf("Not clear if it converges...\n"); return 0; } } void test_convergence_without_averaging() { double w0 = 0.2858964; // exact to last digit int n[2] = {0,0}; double a_mean[2] = {0,0}, a_meansqr[2] = {0,0}, a2_mean[2] = {0,0}, a2_meansqr[2] = {0,0}; for (int a = MINRES; a <= MAXRES; a += RESSTEP) { grid_volume vol = volcyl(1.0,0.0,a); structure s(vol, eps); fields f(&s, 1); f.use_bloch(0.1); f.set_boundary(High, R, Metallic); f.add_point_source(Hr, w0, 2.0, 0.0, 5.0, veccyl(0.2,0.0)); while (f.time() < f.last_source_time()) f.step(); int t_harminv_max = 2500; // try increasing this in case of failure complex *mon_data = new complex[t_harminv_max]; int t = 0; monitor_point mp; while (t < t_harminv_max) { f.step(); f.get_point(&mp, veccyl(0.2,0.0)); mon_data[t] = mp.get_component(Er); t++; } int maxbands = 10, nfreq; complex *amps = new complex[maxbands]; ; double *freq_re = new double[maxbands], *freq_im = new double[maxbands]; double *errors = new double[maxbands]; nfreq = do_harminv(mon_data, t_harminv_max - 1, f.dt, 0.10, 0.50, maxbands, amps, freq_re, freq_im, errors); double w = 0.0; for (int jf = 0; jf < nfreq; jf++) if (abs(freq_re[jf] - w0) < abs(w - w0)) w = freq_re[jf]; double e = -(w-w0)/w0, ea = e*a, ea2=e*a*a; // to check 1/a and 1/(a*a) convergence //master_printf("Using a = %d ...\n", a); //master_printf("a = %3d\tw = %g \t(w-w0)/w0*a = %4.2e \t(w-w0)/w0*a*a = %4.2e\n", a, w, ea, ea2); master_printf("noavg:, %d, %g, %g\n", a, w, fabs(e)); // Statistical analysis int index = (2*(a/2)==a) ? 0 : 1; // even / odd a_mean[index] += ea; a_meansqr[index] += ea*ea; a2_mean[index] += ea2; a2_meansqr[index] += ea2*ea2; n[index]++; } for (int i=0;i<2;i++) a_mean[i] /= n[i]; for (int i=0;i<2;i++) a_meansqr[i] /= n[i]; for (int i=0;i<2;i++) a2_mean[i] /= n[i]; for (int i=0;i<2;i++) a2_meansqr[i] /= n[i]; /* Note: in older versions of Meep, even with "no averaging" there was some funny averaging that happened to give quadratic convergence for the even-resolution cylindrical case here. We no longer do this -- "no averaging" really means no averaging now. */ if (find_exponent(a_mean[0], a_meansqr[0], a2_mean[0], a2_meansqr[0], "Even") != 1) abort("Failed even convergence test with no fancy averaging!\n"); if (find_exponent(a_mean[1], a_meansqr[1], a2_mean[1], a2_meansqr[1], "Odd") != 1) abort("Failed odd convergence test with no fancy averaging!\n"); master_printf("Passed convergence test with no fancy averaging!\n"); } void test_convergence_with_averaging() { double w0 = 0.2858964; // exact to last digit int n[2] = {0,0}; double a_mean[2] = {0,0}, a_meansqr[2] = {0,0}, a2_mean[2] = {0,0}, a2_meansqr[2] = {0,0}; for (int a = MINRES; a <= MAXRES; a += RESSTEP) { grid_volume vol = volcyl(1.0,0.0,a); structure s(vol, eps); s.set_epsilon(eps); fields f(&s, 1); f.use_bloch(0.1); f.set_boundary(High, R, Metallic); f.add_point_source(Hr, w0, 2.0, 0.0, 5.0, veccyl(0.2,0.0)); while (f.time() < f.last_source_time()) f.step(); int t_harminv_max = 2500; // try increasing this in case of failure complex *mon_data = new complex[t_harminv_max]; int t = 0; monitor_point mp; while (t < t_harminv_max) { f.step(); f.get_point(&mp, veccyl(0.2,0.0)); mon_data[t] = mp.get_component(Er); t++; } int maxbands = 10, nfreq; complex *amps = new complex[maxbands]; ; double *freq_re = new double[maxbands], *freq_im = new double[maxbands], *errors = new double[maxbands]; nfreq = do_harminv(mon_data, t_harminv_max - 1, f.dt, 0.10, 0.50, maxbands, amps, freq_re, freq_im, errors); double w = 0.0; for (int jf = 0; jf < nfreq; jf++) if (abs(freq_re[jf] - w0) < abs(w - w0)) w = freq_re[jf]; double e = -(w-w0)/w0, ea = e*a, ea2=e*a*a; // to check 1/a and 1/(a*a) convergence //master_printf("Using a = %d ...\n", a); //master_printf("a = %3d\tw = %g \t(w-w0)/w0*a = %4.2e \t(w-w0)/w0*a*a = %4.2e\n", a, w, ea, ea2); master_printf("avg:, %d, %g, %g\n", a, w, fabs(e)); // Statistical analysis int index = (2*(a/2)==a) ? 0 : 1; // even / odd a_mean[index] += ea; a_meansqr[index] += ea*ea; a2_mean[index] += ea2; a2_meansqr[index] += ea2*ea2; n[index]++; } for (int i=0;i<2;i++) a_mean[i] /= n[i]; for (int i=0;i<2;i++) a_meansqr[i] /= n[i]; for (int i=0;i<2;i++) a2_mean[i] /= n[i]; for (int i=0;i<2;i++) a2_meansqr[i] /= n[i]; if (find_exponent(a_mean[0], a_meansqr[0], a2_mean[0], a2_meansqr[0], "Even") != 2) abort("Failed convergence test with anisotropic dielectric averaging!\n"); if (find_exponent(a_mean[1], a_meansqr[1], a2_mean[1], a2_meansqr[1], "Odd") != 2) abort("Failed convergence test with anisotropic dielectric averaging!\n"); master_printf("Passed convergence test with anisotropic dielectric averaging!\n"); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HARMINV master_printf("Testing convergence of a waveguide mode frequency...\n"); test_convergence_without_averaging(); test_convergence_with_averaging(); #endif return 0; } meep-1.3/tests/harmonics.cpp0000644000175400001440000001023012506540456013060 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Nonlinear test program checking 2nd and 3rd harmonic generation */ #include using namespace meep; using namespace std; double the_value = 1.0; double value(const vec &) { return the_value; } void harmonics(double freq, double chi2, double chi3, double J, double &A2, double &A3) { const double dpml = 5.0; const double res = 20; const double sz = 100+2*dpml; grid_volume gv = vol1d(sz, res); gv.center_origin(); the_value = 1.0; structure s(gv, value, pml(dpml)); the_value = chi2; s.set_chi2(value); the_value = chi3; s.set_chi3(value); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5 * sz + dpml), J); vec fpt(0.5 * sz - dpml - 0.5); dft_flux d1 = f.add_dft_flux(Z, volume(fpt), freq, freq, 1); dft_flux d2 = f.add_dft_flux(Z, volume(fpt), 2*freq, 2*freq, 1); dft_flux d3 = f.add_dft_flux(Z, volume(fpt), 3*freq, 3*freq, 1); double emax = 0; while (f.time() < f.last_source_time()) { emax = max(emax, abs(f.get_field(Ex, fpt))); f.step(); } do { double emaxcur = 0; double T = f.time() + 50; while (f.time() < T) { double e = abs(f.get_field(Ex, fpt)); emax = max(emax, e); emaxcur = max(emaxcur, e); f.step(); } if (emaxcur < 1e-6 * emax) break; } while(1); double *d1f = d1.flux(); double *d2f = d2.flux(); double *d3f = d3.flux(); A2 = *d2f / *d1f; A3 = *d3f / *d1f; master_printf("harmonics(%g,%g,%g) = %g, %g\n", chi2, chi3, J, A2, A3); delete[] d1f; delete[] d2f; delete[] d3f; } int different(double a, double a0, double thresh, const char *msg) { if (fabs(a - a0) > thresh * fabs(a0)) { master_printf("error: %s\n --- %g vs. %g (%g error > %g)\n", msg, a, a0, fabs(a - a0)/fabs(a0), thresh); return 1; } else return 0; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const double freq = 1.0 / 3.0; double a2, a3, a2_2, a3_2; double thresh = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-5; harmonics(freq, 0.27e-4, 1e-4, 1.0, a2, a3); if (different(a2, 9.80298e-07, thresh, "2nd harmonic mismatches known val")) return 1; if (different(a3, 9.97759e-07, thresh, "3rd harmonic mismatches known val")) return 1; harmonics(freq, 0.54e-4, 2e-4, 1.0, a2_2, a3_2); master_printf("doubling chi2, chi3 = %g x 2nd harmonic, %g x 3rd\n", a2_2 / a2, a3_2 / a3); if (different(a2_2 / a2, 4.0, 0.01, "incorrect chi2 scaling")) return 1; if (different(a3_2 / a3, 4.0, 0.01, "incorrect chi3 scaling")) return 1; harmonics(freq, 0.27e-4, 1e-4, 2.0, a2_2, a3_2); master_printf("doubling J = %g x 2nd harmonic, %g x 3rd\n", a2_2 / a2, a3_2 / a3); if (different(a2_2 / a2, 4.0, 0.01, "incorrect J scaling for 2nd harm.")) return 1; if (different(a3_2 / a3, 16.0, 0.01, "incorrect J scaling for 3rd harm.")) return 1; harmonics(freq, 0.27e-4, 0.0, 1.0, a2_2, a3_2); if (different(a2, a2_2, 1e-2, "chi3 has too big effect on 2nd harmonic")) return 1; if (a3_2 / a3 > 1e-4) { master_printf("error: too much 3rd harmonic without chi3\n"); return 1; } harmonics(freq, 0.0, 1e-4, 1.0, a2_2, a3_2); if (different(a3, a3_2, 1e-3, "chi2 has too big effect on 3rd harmonic")) return 1; if (a2_2 / a2 > 1e-5) { master_printf("error: too much 2nd harmonic without chi3\n"); return 1; } return 0; } meep-1.3/tests/symmetry.cpp0000644000175400001440000011301112506540456012767 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; using namespace std; const char *mydirname = "symmetry-out"; double one(const vec &) { return 1.0; } vec the_center; double rods_2d(const vec &pp) { vec p = pp - the_center; while (p.x() > 0.5) p -= vec(1.0,0); while (p.x() <-0.5) p += vec(1.0,0); while (p.y() > 0.5) p -= vec(0,1.0); while (p.y() <-0.5) p += vec(0,1.0); if (fabs(p.x()) < 0.314) return 12.0; if (fabs(p.y()) < 0.314) return 12.0; return 1.0; } #if MEEP_SINGLE static double eps_compare = 1e-3; static double thresh_compare = 1e-3; #else static double eps_compare = 1e-9; static double thresh_compare = 1e-8; #endif static inline double max(double a, double b) { return a > b ? a : b; } int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*eps_compare && max(fabs(a),fabs(b)) > thresh_compare) { master_printf("%s = %g differs by %g from %g\n", n, a, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (!compare(real(v1),real(v2),"real part") || !compare(imag(v1),imag(v2),"imaginary part")) { master_printf("%s differs by %g%+gi from %g%+gi\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at "); LOOP_OVER_DIRECTIONS(p.dim,d) master_printf("%s = %g, ", direction_name(d), p.in_direction(d)); master_printf("time %g\n", f1.time()); return 0; } } } return 1; } void check_unequal_layout(const fields &f1, const fields &f2) { if (f1.equal_layout(f2) || !f1.equal_layout(f1) || !f2.equal_layout(f2)) abort("fields::equal_layout did not return expected result"); } int test_cyl_metal_mirror(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in Cylindrical...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = volcyl(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); f1.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); fields f(&s); f.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); f.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.01, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.21, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.501, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.33, 0.46 ))) return 0; if (!compare_point(f, f1, veccyl(0.2, 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_cyl_metal_mirror_nonlinear(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in Cylindrical...\n"); double a = 16.0; double ttot = 3.0; const grid_volume gv = volcyl(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_chi3(one); s1.set_chi3(one); fields f1(&s1); f1.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); // f1.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); fields f(&s); f.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); // f.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.01, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.21, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.501, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.33, 0.46 ))) return 0; if (!compare_point(f, f1, veccyl(0.2, 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_1d_periodic_mirror(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in 1D...\n"); double a = 16.0; double ttot = 3.0; const grid_volume gv = volone(1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.use_bloch(0.0); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.5)); fields f(&s); f.use_bloch(0.0); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01))) return 0; if (!compare_point(f, f1, vec(0.33))) return 0; if (!compare_point(f, f1, vec(0.50))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_origin_shift(void) { master_printf("Testing origin shift in 2D...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = voltwo(1.0, 1.0, a); grid_volume vcentered = gv; vcentered.shift_origin(-gv.center()); structure s(vcentered, one); structure s1(gv, one); fields f1(&s1); fields f(&s); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, gv.center()); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, gv.center()); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.0,0.0)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.0,0.0)); check_unequal_layout(f, f1); while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare(f.field_energy(), f1.field_energy(), " total energy")) { master_printf("Time is %g\n", f.time()); return 0; } } return 1; } int test_metal_xmirror(double eps(const vec &)) { master_printf("Testing X mirror symmetry...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401)); fields f(&s); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_xmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing X mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.51,0.55)); f1.add_point_source(Hx, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401,0.43)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.51,0.55)); f.add_point_source(Hx, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401,0.43)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.5))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_zmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.1, 0.6, 1.0, a); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); f1.add_point_source(Ey, 0.8, 0.6, 0.0, 4.0, vec(0.43,0.401,0.5)); fields f(&s); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); f.add_point_source(Ey, 0.8, 0.6, 0.0, 4.0, vec(0.43,0.401,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_odd_zmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.1, 0.6, 1.0, a); const symmetry S = -mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing odd Z mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_rot4z(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.52)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5,0.43)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.52)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5,0.43)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_rot4z_mirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = rotate4(Z,gv) + mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry in 3D with horizontal mirror...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_3D_metal_3mirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = mirror(Z,gv) - mirror(Y,gv) - mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing three mirror planes in 3D...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_metal_ymirror(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Y mirror symmetry...\n"); fields f1(&s1); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); fields f(&s); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_yperiodic_ymirror(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing Y periodic with mirror symmetry...\n"); fields f1(&s1); f1.use_bloch(vec(0.1*pi/2,0.0)); //f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); fields f(&s); f.use_bloch(vec(0.1*pi/2,0.0)); //f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.951 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) { return 0; } if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int test_metal_rot2y(double eps(const vec &)) { double a = 16.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate2(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Y twofold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.25, 0.875), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.25,0.375), 1.0); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.75, 0.875),-1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.75,0.375),-1.0); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.25,0.875 ), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.25,0.375), 1.0); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.875 ),-1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.75,0.375),-1.0); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int exact_metal_rot2y(double eps(const vec &)) { double a = 16.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.5, a); the_center = gv.center(); const symmetry S = rotate2(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing exact Y twofold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5, 0.875)); f1.add_point_source(Hy, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.375)); fields f(&s); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5, 0.875)); f.add_point_source(Hy, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.375)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int pml_twomirrors(double eps(const vec &)) { double a = 16.0; double ttot = 10.0; const grid_volume gv = voltwo(2.0, 2.0, a); the_center = gv.center(); const symmetry S = mirror(X,gv) + mirror(Y,gv); structure s_mm(gv, eps, pml(0.5), S); structure s1(gv, eps, pml(0.5), identity()); master_printf("Testing two mirrors with PML...\n"); fields f_mm(&s_mm); fields f1(&s1); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.0,1.0),-1.5); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.75)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,1.25)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,0.75)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,1.25)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.0,1.0),-1.5); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.75)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,1.25)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,0.75)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,1.25)); check_unequal_layout(f_mm, f1); double field_energy_check_time = 3.0; while (f_mm.round_time() < ttot) { f_mm.step(); f1.step(); if (!compare_point(f1, f_mm, vec(0.01 , 0.5))) return 0; if (!compare_point(f1, f_mm, vec(0.21 , 0.5))) return 0; if (!compare_point(f1, f_mm, vec(0.46 , 0.33))) return 0; if (!compare_point(f1, f_mm, vec(0.2 , 0.2 ))) return 0; if (f_mm.round_time() >= field_energy_check_time) { if (!compare(f_mm.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; field_energy_check_time += 3.0; } } return 1; } int exact_metal_rot4z(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int exact_metal_rot4z_nonlinear(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_chi3(one); s1.set_chi3(one); master_printf("Testing nonlinear Z fourfold rotational symmetry...\n"); fields f1(&s1); //f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); fields f(&s); //f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } int exact_pml_rot2x_tm(double eps(const vec &)) { double a = 8.0; double ttot = 30.0; const grid_volume gv = voltwo(3.0, 3.0, a); the_center = gv.center(); const symmetry S = rotate2(X,gv); structure s(gv, eps, pml(1.0), S); structure s1(gv, eps, pml(1.0), identity()); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing X twofold rotational symmetry with PML...\n"); fields f1(&s1); f1.add_point_source(Hx, 0.7, 2.5, 0.0, 4.0, vec(1.3,1.5)); fields f(&s); f.add_point_source(Hx, 0.7, 2.5, 0.0, 4.0, vec(1.3,1.5)); check_unequal_layout(f, f1); double field_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 1.5))) return 0; if (!compare_point(f, f1, vec(1.21 , 1.5))) return 0; if (!compare_point(f, f1, vec(1.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.2 , 1.2 ))) return 0; if (f.round_time() >= field_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; field_energy_check_time += 1.0; } } return 1; } double sigma(const vec &) { return 7.63; } double polariton_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; master_printf("Testing polariton in %s...\n", dimension_name(gv.dim)); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps); structure sS(gv, eps, no_pml(), S); s.add_susceptibility(sigma, E_stuff, lorentzian_susceptibility(0.3, 0.1)); sS.add_susceptibility(sigma, E_stuff, lorentzian_susceptibility(0.3, 0.1)); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); fields fS(&sS); fS.use_real_fields(); fS.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); f.use_bloch(zero_vec(gv.dim)); fS.use_bloch(zero_vec(gv.dim)); check_unequal_layout(f, fS); while (f.round_time() < ttot) { f.step(); fS.step(); if (!compare_point(fS, f, gv.center())) return 0; if (!compare_point(fS, f, zero_vec(gv.dim))) return 0; if (!compare_point(fS, f, gv.center()*0.3)) return 0; } return 1; } double nonlinear_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; master_printf("Testing nonlinear in %s...\n", dimension_name(gv.dim)); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps); structure sS(gv, eps, no_pml(), S); s.set_chi3(one); sS.set_chi3(one); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); fields fS(&sS); fS.use_real_fields(); fS.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); f.use_bloch(zero_vec(gv.dim)); fS.use_bloch(zero_vec(gv.dim)); check_unequal_layout(f, fS); while (f.round_time() < ttot) { f.step(); fS.step(); if (!compare_point(fS, f, gv.center())) return 0; if (!compare_point(fS, f, zero_vec(gv.dim))) return 0; if (!compare_point(fS, f, gv.center()*0.3)) return 0; } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; trash_output_directory(mydirname); master_printf("Testing with various kinds of symmetry...\n"); if (!test_1d_periodic_mirror(one)) abort("error in test_1d_periodic_mirror vacuum\n"); if (!test_cyl_metal_mirror(one)) abort("error in test_cyl_metal_mirror vacuum\n"); if (!test_yperiodic_ymirror(one)) abort("error in test_yperiodic_ymirror vacuum\n"); if (!test_yperiodic_ymirror(rods_2d)) abort("error in test_yperiodic_ymirror rods2d\n"); if (!pml_twomirrors(one)) abort("error in pml_twomirrors vacuum\n"); if (!test_origin_shift()) abort("error in test_origin_shift\n"); if (!exact_pml_rot2x_tm(one)) abort("error in exact_pml_rot2x_tm vacuum\n"); if (!test_metal_xmirror(rods_2d)) abort("error in test_metal_xmirror rods_2d\n"); if (!test_metal_xmirror(one)) abort("error in test_metal_xmirror vacuum\n"); if (!test_metal_ymirror(one)) abort("error in test_metal_ymirror vacuum\n"); if (!test_metal_ymirror(rods_2d)) abort("error in test_metal_ymirror rods_2d\n"); if (!test_metal_rot2y(one)) abort("error in test_metal_rot2y vacuum\n"); if (!test_metal_rot2y(rods_2d)) abort("error in test_metal_rot2y rods_2d\n"); if (!exact_metal_rot2y(one)) abort("error in exact_metal_rot2y vacuum\n"); if (!exact_metal_rot2y(rods_2d)) abort("error in exact_metal_rot2y rods_2d\n"); if (!exact_metal_rot4z(one)) abort("error in exact_metal_rot4z vacuum\n"); if (!exact_metal_rot4z(rods_2d)) abort("error in exact_metal_rot4z rods_2d\n"); if (!test_3D_metal_xmirror(one)) abort("error in test_3D_metal_xmirror vacuum\n"); if (!test_3D_metal_zmirror(one)) abort("error in test_3D_metal_zmirror vacuum\n"); if (!test_3D_metal_odd_zmirror(one)) abort("error in test_3D_metal_odd_zmirror vacuum\n"); if (!test_3D_metal_rot4z(one)) { all_wait(); abort("error in test_3D_metal_rot4z vacuum\n"); } if (!test_3D_metal_rot4z_mirror(one)) abort("error in test_3D_metal_rot4z_mirror vacuum\n"); if (!test_3D_metal_3mirror(one)) abort("error in test_3D_metal_3mirror\n"); /**************************************************************************/ /* For the following tests, we increase the check tolerance slightly. Floating-point errors can cause these tests to have slightly different results with and without symmetry. Note also that symmetry is tricky with nonlinearity, since in general a nonlinear system does *not* conserve the irreducible representation of the symmetry group (i.e. symmetry doesn't work). The simulations here are chosen to preserve the symmetry, however. */ #if !MEEP_SINGLE thresh_compare = 1e-10; #endif if (!nonlinear_ex(vol1d(1.0, 30.0), one)) abort("error in 1D nonlinear vacuum\n"); if (!nonlinear_ex(vol3d(1.0, 1.2, 0.8, 10.0), one)) abort("error in 3D nonlinear vacuum\n"); if (!test_cyl_metal_mirror_nonlinear(one)) abort("error in test_cyl_metal_mirror nonlinear vacuum\n"); if (!exact_metal_rot4z_nonlinear(one)) abort("error in exact_metal_rot4z nonlinear vacuum\n"); if (!exact_metal_rot4z_nonlinear(rods_2d)) abort("error in exact_metal_rot4z nonlinear rods_2d\n"); // I'm not sure why the polariton tests require increased tolerances...? if (!polariton_ex(vol1d(1.0, 30.0), one)) abort("error in 1D polariton vacuum\n"); if (!polariton_ex(vol3d(1.0, 1.2, 0.8, 10.0), one)) abort("error in 3D polariton vacuum\n"); return 0; } meep-1.3/tests/integrate.cpp0000644000175400001440000003146312506540456013072 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Check of fields::integrate, by giving it random volumes in which to integrate purely linear functions of the coordinates--by construction, we should be able to integrate these exactly. */ #include #include #include #include using namespace meep; using namespace std; double size[3] = {3.0,3.0,2.6}; static double one(const vec &p) { (void) p; return 1.0; } typedef struct { direction dx, dy, dz; double c, ax,ay,az, axy,ayz,axz, axyz; long double sum; } linear_integrand_data; /* integrand for integrating c + ax*x + ay*y + az*z. */ static complex linear_integrand(const complex *fields, const vec &loc, void *data_) { linear_integrand_data *data = (linear_integrand_data *) data_; (void) fields; // unused // clean_vec is only necessary because we reference X/Y/Z for any gv.dim vec locS(clean_vec(loc)); return (data->c + data->ax * locS.in_direction(data->dx) + data->ay * locS.in_direction(data->dy) + data->az * locS.in_direction(data->dz) + data->axy * locS.in_direction(data->dx) * locS.in_direction(data->dy) + data->ayz * locS.in_direction(data->dz) * locS.in_direction(data->dy) + data->axz * locS.in_direction(data->dx) * locS.in_direction(data->dz) + data->axyz * locS.in_direction(data->dx) * locS.in_direction(data->dy) * locS.in_direction(data->dz) ); } /* integrals of 1 and x, respectively, from a to b, or 1 and x if a==b: */ static double integral1(double a, double b, direction d) { if (d == R) return a==b ? 2*pi*a : pi*(b*b-a*a); else return a==b ? 1 : b-a; } static double integralx(double a, double b, direction d) { if (d == R) return a==b ? 2*pi*a*a : 2*pi*(b*b*b-a*a*a)*.3333333333333333333333333; else return a==b ? a : (b*b-a*a)*.5; } static double correct_integral(const volume &v, const linear_integrand_data &data) { direction x = data.dx, y = data.dy, z = data.dz; double x1 = v.in_direction_min(x); double x2 = v.in_direction_max(x); double y1 = v.in_direction_min(y); double y2 = v.in_direction_max(y); double z1 = v.in_direction_min(z); double z2 = v.in_direction_max(z); return (data.c * integral1(x1,x2,x) * integral1(y1,y2,y) * integral1(z1,z2,z) + data.ax * integralx(x1,x2,x) * integral1(y1,y2,y) * integral1(z1,z2,z) + data.ay * integral1(x1,x2,x) * integralx(y1,y2,y) * integral1(z1,z2,z) + data.az * integral1(x1,x2,x) * integral1(y1,y2,y) * integralx(z1,z2,z) + data.axy * integralx(x1,x2,x) * integralx(y1,y2,y) * integral1(z1,z2,z) + data.ayz * integral1(x1,x2,x) * integralx(y1,y2,y) * integralx(z1,z2,z) + data.axz * integralx(x1,x2,x) * integral1(y1,y2,y) * integralx(z1,z2,z) + data.axyz * integralx(x1,x2,x) * integralx(y1,y2,y) * integralx(z1,z2,z) ); } // uniform pseudo-random number in [min,max] static double urand(double min, double max) { return (rand() * ((max - min) / RAND_MAX) + min); } static volume random_gv(ndim dim) { volume v(dim); double s[3] = {0,0,0}; int idim = dim == Dcyl ? 1 : int(dim); switch (rand() % (idim + 2)) { /* dimensionality */ case 0: break; case 1: { int d = rand() % (idim + 1); s[d] = urand(0, size[d]); break; } case 2: { int d1 = rand() % (idim + 1); int d2 = (d1 + 1 + rand() % 2) % 3; s[d1] = urand(0, size[d1]); s[d2] = urand(0, size[d2]); break; } case 3: s[0] = urand(0, size[0]); s[1] = urand(0, size[1]); s[2] = urand(0, size[2]); } switch (dim) { case D1: v.set_direction_min(X, 0); v.set_direction_max(X, 0); v.set_direction_min(Y, 0); v.set_direction_max(Y, 0); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(Z, s[0] + v.in_direction_min(Z)); break; case D2: v.set_direction_min(X, urand(-100, 100)); v.set_direction_min(Y, urand(-100, 100)); v.set_direction_max(X, s[0] + v.in_direction_min(X)); v.set_direction_max(Y, s[1] + v.in_direction_min(Y)); v.set_direction_min(Z, 0); v.set_direction_max(Z, 0); break; case Dcyl: v.set_direction_min(X, 0); v.set_direction_max(X, 0); v.set_direction_min(Y, 0); v.set_direction_max(Y, 0); v.set_direction_min(R, 0.1 + urand(0, size[0] - s[0])); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(R, s[0] + v.in_direction_min(R)); v.set_direction_max(Z, s[1] + v.in_direction_min(Z)); v.set_direction_min(P, 0); v.set_direction_max(P, 0); break; case D3: v.set_direction_min(X, urand(-100, 100)); v.set_direction_min(Y, urand(-100, 100)); v.set_direction_max(X, s[0] + v.in_direction_min(X)); v.set_direction_max(Y, s[1] + v.in_direction_min(Y)); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(Z, s[2] + v.in_direction_min(Z)); break; default: abort("unsupported dimensionality in integrate.cpp"); } return v; } void check_integral(fields &f, linear_integrand_data &d, const volume &v, component cgrid) { double x1 = v.in_direction_min(d.dx); double x2 = v.in_direction_max(d.dx); double y1 = v.in_direction_min(d.dy); double y2 = v.in_direction_max(d.dy); double z1 = v.in_direction_min(d.dz); double z2 = v.in_direction_max(d.dz); master_printf("Check %d-dim. %s integral in %s cell with %s integrand...", (x2 - x1 > 0) + (y2 - y1 > 0) + (z2 - z1 > 0), component_name(cgrid), v.dim == D3 ? "3d" : (v.dim == D2 ? "2d" : (v.dim == Dcyl ? "cylindrical" : "1d")), (d.c == 1.0 && !d.axy && !d.ax && !d.ay && !d.az && !d.axy && !d.ayz && !d.axz) ? "unit" : "linear"); if (0) master_printf("\n... grid_volume (%g,%g,%g) at (%g,%g,%g) with integral (%g, %g,%g,%g, %g,%g,%g, %g)...\n", x2 - x1, y2 - y1, z2 - z1, (x1+x2)/2, (y1+y2)/2, (z1+z2)/2, d.c, d.ax,d.ay,d.az, d.axy,d.ayz,d.axz, d.axyz); double sum = real(f.integrate(0, 0, linear_integrand, (void *) &d, v)); if (fabs(sum - correct_integral(v, d)) > 1e-9 * fabs(sum)) abort("FAILED: %0.16g instead of %0.16g\n", (double) sum, correct_integral(v, d)); master_printf("...PASSED.\n"); } void check_splitsym(const grid_volume &gv, int splitting, const symmetry &S, const char *Sname) { const int num_random_trials = 100; structure s(gv, one, no_pml(), S, splitting); fields f(&s); // periodic boundaries: f.use_bloch(zero_vec(gv.dim)); linear_integrand_data d; if (gv.dim == Dcyl) { d.dx = R; d.dy = P; d.dz = Z; } else { d.dx = X; d.dy = Y; d.dz = Z; } master_printf("\nCHECKS for splitting=%d, symmetry=%s\n...", splitting, Sname); for (int i = 0; i < num_random_trials; ++i) { volume v(random_gv(gv.dim)); component cgrid; do { cgrid = component(rand() % (Dielectric + 1)); } while (coordinate_mismatch(gv.dim, component_direction(cgrid))); // try integral of 1 first (easier to debug, I hope) d.c = 1.0; d.ax = d.ay = d.az = d.axy = d.ayz = d.axz = d.axyz = 0.0; check_integral(f, d, v, cgrid); d.c = urand(-1,1); d.ax = urand(-1,1); d.ay = urand(-1,1); d.az = urand(-1,1); d.axy = urand(-1,1); d.ayz = urand(-1,1); d.axz = urand(-1,1); d.axyz = urand(-1,1); if (gv.dim == Dcyl) // cyl. doesn't integrate linear functions of r exactly d.ax = d.axy = d.axz = d.axyz = 0; check_integral(f, d, v, cgrid); } } // check LOOP_OVER_VOL and LOOP_OVER_VOL_OWNED macros void check_loop_vol(const grid_volume &gv, component c) { int count = 0, min_i = gv.ntot(), max_i = 0, count_owned = 0; master_printf("Checking %s loops for %s grid_volume...\n", component_name(c), dimension_name(gv.dim)); ivec vmin(gv.little_corner() + gv.iyee_shift(c)); ivec vmax(gv.big_corner() + gv.iyee_shift(c)); LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL loc (err = %g) at i=%d\n", abs(here0 - here), i); ++count; if (i < min_i) min_i = i; if (i > max_i) max_i = i; if (gv.owns(ihere)) ++count_owned; if (ihere < vmin || ihere > vmax) abort("FAILED: LOOP_OVER_VOL outside V at i=%d\n", i); } if (count != gv.ntot()) abort("FAILED: LOOP_OVER_VOL has %d iterations instead of ntot=%d\n", count, gv.ntot()); if (count_owned != gv.nowned(c)) abort("FAILED: LOOP_OVER_VOL has %d owned points instead of nowned=%d\n", count_owned, gv.nowned(c)); if (min_i != 0) abort("FAILED: LOOP_OVER_VOL has minimum index %d instead of 0\n", min_i); if (max_i != gv.ntot() - 1) abort("FAILED: LOOP_OVER_VOL has max index %d instead of ntot-1\n", max_i); count = 0; LOOP_OVER_VOL_OWNED(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL_OWNED iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL_OWNED loc (err = %g) at i=%d\n", abs(here0 - here), i); if (!gv.owns(ihere)) abort("FAILED: LOOP_OVER_VOL_OWNED includes non-owned at i=%d\n", i); ++count; } if (count != count_owned) abort("FAILED: LOOP_OVER_VOL_OWNED has %d iterations instead of %d\n", count, count_owned); count = 0; LOOP_OVER_VOL_NOTOWNED(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED loc (err = %g) at i=%d\n", abs(here0 - here), i); if (gv.owns(ihere)) abort("FAILED: LOOP_OVER_VOL_NOTOWNED includes owned at i=%d\n", i); if (ihere < vmin || ihere > vmax) abort("FAILED: LOOP_OVER_VOL_NOTOWNED outside V at i=%d\n", i); ++count; } if (count != gv.ntot() - count_owned) abort("FAILED: LOOP_OVER_VOL_NOTOWNED has %d iterations instead of %d\n", count, gv.ntot() - count_owned); master_printf("...PASSED.\n"); } int main(int argc, char **argv) { const double a = 10.0; initialize mpi(argc, argv); quiet = true; const grid_volume v3d = vol3d(size[0], size[1], size[2], a); const grid_volume v3d0 = vol3d(size[0], size[1], 0, a); const grid_volume v3d00 = vol3d(size[0], 0, 0, a); const grid_volume v2d = vol2d(size[0], size[1], a); const grid_volume v1d = vol1d(size[0], a); const grid_volume vcyl = volcyl(size[0], size[1], a); for (int ic = Ex; ic <= Dielectric; ++ic) { component c = component(ic); check_loop_vol(v1d, c); check_loop_vol(v2d, c); check_loop_vol(v3d, c); check_loop_vol(vcyl, c); check_loop_vol(v3d0, c); check_loop_vol(v3d00, c); } srand(0); // use fixed random sequence for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v3d, splitting, identity(), "identity"); check_splitsym(v3d, splitting, mirror(X,v3d), "mirrorx"); check_splitsym(v3d, splitting, mirror(Y,v3d), "mirrory"); check_splitsym(v3d, splitting, mirror(X,v3d) + mirror(Y,v3d), "mirrorxy"); check_splitsym(v3d, splitting, rotate4(Z,v3d), "rotate4"); } for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v2d, splitting, identity(), "identity"); check_splitsym(v2d, splitting, mirror(X,v2d), "mirrorx"); check_splitsym(v2d, splitting, mirror(Y,v2d), "mirrory"); check_splitsym(v2d, splitting, mirror(X,v2d) + mirror(Y,v2d), "mirrorxy"); check_splitsym(v2d, splitting, rotate4(Z,v2d), "rotate4"); } const grid_volume vcyl_pad = volcyl(size[0] + 0.2, size[1], a); for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(vcyl_pad, splitting, identity(), "identity"); check_splitsym(vcyl_pad, splitting, mirror(Z,vcyl), "mirrorz"); } for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v1d, splitting, identity(), "identity"); check_splitsym(v1d, splitting, mirror(Z,v1d), "mirrorz"); } return 0; } meep-1.3/tests/cylindrical.cpp0000644000175400001440000003221012506540456013374 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } int compare(double a, double b, const char *n, double eps=4e-15) { if (sizeof(realnum) == sizeof(float)) eps = sqrt(eps)*10; if (fabs(a-b) > fabs(b)*eps && fabs(b) > 1e-14) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p, double eps=4e-8) { if (sizeof(realnum) == sizeof(float)) eps = sqrt(eps); monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > eps*abs(v2) && abs(v2) > eps*100) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g, time %g\n", p.r(), p.z(), f1.time()); all_wait(); return 0; } } } return 1; } int test_simple_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 30.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps, no_pml(), identity(), 0, 0.4); structure s(gv, eps, no_pml(), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Trying with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.use_bloch(0.0); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); fields f1(&s1, m); f1.use_bloch(0.0); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double field_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.5, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } } return 1; } int test_simple_metallic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 30.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps, no_pml(), identity(), 0, 0.4); structure s(gv, eps, no_pml(), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Metallic with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); fields f1(&s1, m); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double field_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.5, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } } return 1; } int test_r_equals_zero(double eps(const vec &), const char *mydirname) { double a = 10.0; double ttot = 3.0; grid_volume gv = volcyl(1.5,0.8,a); structure s(gv, eps, no_pml(), identity(), 0, 0.4); s.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Checking at r == 0 with m = %d...\n", m); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); while (f.time() < ttot) f.step(); monitor_point p; f.get_point(&p, veccyl(0.0, 0.5)); if (p.get_component(Ez) != 0.0 && (m & 1)) { master_printf("Got non-zero Ez with m == %d\n", m); return 0; } if (p.get_component(Hz) != 0.0 && (m & 1)) { master_printf("Got non-zero Hz with m == %d\n", m); return 0; } if (p.get_component(Er) != 0.0 && !(m & 1)) { master_printf("Got non-zero Er with m == %d\n", m); return 0; } if (p.get_component(Ep) != 0.0 && !(m & 1)) { master_printf("Got non-zero Ep with m == %d\n", m); return 0; } if (p.get_component(Hr) != 0.0 && !(m & 1)) { master_printf("Got non-zero Hr with m == %d\n", m); return 0; } if (p.get_component(Hp) != 0.0 && !(m & 1)) { master_printf("Got non-zero Hp of %g %g with m == %d\n", real(p.get_component(Hp)), imag(p.get_component(Hp)), m); return 0; } } return 1; } int test_pml(double eps(const vec &), int splitting, const char *mydirname) { double a = 8; double ttot = 25.0; grid_volume gv = volcyl(3.5,10.0,a); structure s1(gv, eps, pml(2.0), identity(), 0, 0.4); structure s(gv, eps, pml(2.0), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("PML with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); fields f1(&s1, m); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume", 3e-14)) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double field_energy_check_time = 10.0; while (f.time() < ttot) { f.step(); f1.step(); //f.output_real_imaginary_slices("multi"); //f1.output_real_imaginary_slices("single"); if (!compare_point(f, f1, veccyl(0.5, 7.0))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), "pml total energy", 1e-13)) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy", 1e-13)) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy", 1e-13)) return 0; field_energy_check_time += 10.0; } } } return 1; } complex checkers(const vec &pt) { const double ther = pt.r() + 0.0001; // Just to avoid roundoff issues. const double thez = pt.r() + 0.0001; // Just to avoid roundoff issues. int z = (int) (thez*5.0); int r = (int) (ther*5.0); int zz = (int) (thez*10.0); int rr = (int) (ther*10.0); if ((r & 1) ^ (z & 1)) return cos(thez*ther); if ((rr & 1) ^ (zz & 1)) return 1.0; return 0.0; } int test_pattern(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<1;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Trying test pattern with m = %d and %d chunks...\n", m, splitting); fields f(&s, m); f.use_bloch(0.0); fields f1(&s1, m); f1.use_bloch(0.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("First chunk is %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); f1.initialize_field(Hp, checkers); f.initialize_field(Hp, checkers); f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.751, 0.401))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.7))) return 0; if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "cylindrical-out"; trash_output_directory(mydirname); master_printf("Testing cylindrical coords under different splittings...\n"); if (!test_r_equals_zero(one, mydirname)) abort("error in test_r_equals_zero"); for (int s=2;s<6;s++) if (!test_pattern(one, s, mydirname)) abort("error in test_pattern\n"); //if (!test_pattern(one, 8, mydirname)) abort("error in crazy test_pattern\n"); //if (!test_pattern(one, 120, mydirname)) abort("error in crazy test_pattern\n"); for (int s=2;s<4;s++) if (!test_simple_periodic(one, s, mydirname)) abort("error in test_simple_periodic\n"); //if (!test_simple_periodic(one, 8, mydirname)) // abort("error in crazy test_simple_periodic\n"); //if (!test_simple_periodic(one, 120, mydirname)) // abort("error in crazy test_simple_periodic\n"); for (int s=2;s<5;s++) if (!test_simple_metallic(one, s, mydirname)) abort("error in test_simple_metallic\n"); //if (!test_simple_metallic(one, 8, mydirname)) // abort("error in crazy test_simple_metallic\n"); //if (!test_simple_metallic(one, 120, mydirname)) // abort("error in crazy test_simple_metallic\n"); for (int s=2;s<6;s++) if (!test_pml(one, s, mydirname)) abort("error in test_pml\n"); return 0; } meep-1.3/tests/2D_convergence.cpp0000644000175400001440000000766112322771055013733 00000000000000#include using namespace meep; #include "config.h" using namespace std; const double diameter = 0.8; const double r = diameter*0.5; double holey_2d(const vec &xx) { const grid_volume gv = vol2d(2.0,1.0,100.0); vec p = xx - gv.center(); while (p.x() <-0.5) p += vec(1.0,0); while (p.x() > 0.5) p -= vec(1.0,0); while (p.y() <-0.5) p += vec(0,1.0); while (p.y() > 0.5) p -= vec(0,1.0); if (fabs(p & p) < r*r - 1e-12) return 1.0; return 12.0; } double holey_shifted_2d(const vec &xx) { return holey_2d(xx + vec(pi*0.01, 3 - pi)*0.5); } double get_the_freq(monitor_point *p, component c) { complex *amp, *freqs; int num; p->harminv(c, &, &freqs, &num, 0.15, 0.20, 8); if (!num) return 0.0; double best_amp = abs(amp[0]), best_freq = fabs(real(freqs[0])); for (int i=1;i best_amp && fabs(imag(freqs[i])/real(freqs[i])) < 0.002) { best_amp = abs(amp[i]); best_freq = fabs(real(freqs[i])); } delete[] freqs; delete[] amp; return best_freq; } double freq_at_resolution(double e(const vec &), double a, component c, double beta) { const grid_volume gv = vol2d(2.0,1.0,a); structure s(gv, e); s.set_epsilon(e); fields f(&s, 0, beta); f.use_real_fields(); f.use_bloch(vec(0,0)); f.add_point_source(c, 0.18, 2.5, 0.0, 6.0, vec(0.5,0.5), 1.0); f.add_point_source(c, 0.18, 2.5, 0.0, 6.0, vec(1.5,0.5),-1.0); while (f.time() <= f.last_source_time() + 10.0 && !interrupt) f.step(); const double fourier_timesteps = 3000.0; const double ttot = fourier_timesteps/a + f.time(); monitor_point *p = NULL; while (f.time() <= ttot) { f.step(); p = f.get_new_point(vec(0.52,0.97), p); } const double freq = get_the_freq(p, c); delete p; return freq; } void check_convergence(component c, double best_guess, double beta) { const double amin = 5.0, amax = 30.0, adelta = 5.0; master_printf("Checking convergence for %s field...\n", component_name(c)); if (beta != 0) master_printf("... using exp(i beta z) z-dependence with beta=%g\n", beta); if (best_guess) master_printf("(The correct frequency should be %g.)\n", best_guess); for (double a=amax; a >= amin; a-=adelta) { const double freq = freq_at_resolution(holey_2d, a, c, beta); const double freq_shifted = freq_at_resolution(holey_shifted_2d, a, c, beta); // Initialize best guess at the correct freq. if (!best_guess) { best_guess = freq + 0.5*(freq_shifted - freq); master_printf("The frequency is approximately %g\n", best_guess); } else { master_printf("frequency for a=%g is %g, %g (shifted), %g (mean)\n", a, freq, freq_shifted, 0.5 * (freq + freq_shifted)); master_printf("Unshifted freq error is %g/%g/%g\n", (freq - best_guess)*a*a, a, a); if (fabs(freq - best_guess)*a*a > 0.4) abort("Frequency doesn't converge properly with a.\n"); master_printf("Shifted freq error is %g/%g/%g\n", (freq_shifted - best_guess)*a*a, a, a); if (fabs(freq_shifted - best_guess)*a*a > 0.4) abort("Frequency doesn't converge properly with a.\n"); } // Check frequency difference... master_printf("Frequency difference with a of %g is %g/%g/%g\n", a, (freq - freq_shifted)*a*a, a, a); if (fabs(freq - freq_shifted)*a*a > 0.4) abort("Frequency difference = doesn't converge properly with a.\n"); } master_printf("Passed 2D resolution convergence test for %s!\n", component_name(c)); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HARMINV master_printf("Running holes square-lattice resolution convergence test.\n"); check_convergence(Ey, 0.179944, 0); // from MPB; correct to >= 4 dec. places check_convergence(Ez, 0.166998, 0); // from MPB; correct to >= 4 dec. places check_convergence(Ez, 0.173605, .1); // from MPB; correct to >= 4 dec. places #endif return 0; } meep-1.3/tests/three_d.cpp0000644000175400001440000002125612506540456012521 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; using namespace std; double one(const vec &) { return 1.0; } double targets(const vec &pt) { const double r = sqrt(pt.x()*pt.x() + pt.y()*pt.y()); double dr = r; while (dr > 1) dr -= 1; if (dr > 0.7001) return 12.0; return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-3; #else static const double tol = 1e-9, thresh = 1e-15; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g %g, time %g\n", p.x(), p.y(), p.z(), f1.time()); return 0; } } } return 1; } int approx_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g %g, time %g\n", p.x(), p.y(), p.z(), f1.time()); return 0; } } } return 1; } int test_metal(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = vol3d(1.5, 0.5, 1.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Metal test using %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.299,0.401), 1.0); double field_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.301 , 0.301 , 0.399 ))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } int test_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = vol3d(1.5, 0.5, 1.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7,0.3)); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.25,0.5), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7,0.3)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.25,0.5), 1.0); double field_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01, 0.5 ))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33, 0.2 ))) return 0; if (!compare_point(f, f1, vec(1.0 , 0.25 , 0.301))) return 0; if (f.time() >= field_energy_check_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; field_energy_check_time += 5.0; } } return 1; } int test_pml(double eps(const vec &), const char *mydirname) { double a = 10.0; grid_volume gv = vol3d(1.5, 1.0, 1.2, a); structure s(gv, eps, pml(0.401)); s.set_output_directory(mydirname); master_printf("Testing pml quality...\n"); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.751,0.5,0.601), 1.0); const double deltaT = 10.0; const double ttot = 3.1*deltaT; double field_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); double last_energy = f.field_energy(); while (f.time() < ttot) { f.step(); if (f.time() >= field_energy_check_time) { const double new_energy = f.field_energy(); master_printf("Got newE/oldE of %g\n", new_energy/last_energy); if (new_energy > last_energy*4e-3) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } field_energy_check_time += deltaT; } } return 1; } int test_pml_splitting(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = vol3d(1.5, 1.0, 1.2, a); structure s1(gv, eps, pml(0.3)); structure s(gv, eps, pml(0.3), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.099,0.499,0.501), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.099,0.499,0.501), 1.0); const double ttot = 31.0; double next_energy_time = 10.0; while (f.time() < ttot) { f.step(); f1.step(); if (!approx_point(f, f1, vec(0.5 , 0.01 , 1.0 ))) return 0; if (!approx_point(f, f1, vec(0.46 , 0.33 , 0.33))) return 0; if (!approx_point(f, f1, vec(1.0 , 1.0 , 0.33))) return 0; if (!approx_point(f, f1, vec(1.3 , 0.3 , 0.15))) return 0; if (f.time() > next_energy_time) { if (!compare(f.field_energy(), f1.field_energy(), " total energy")) return 0; next_energy_time += 10.0; } } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "three_d-out"; trash_output_directory(mydirname); master_printf("Testing 3D...\n"); if (!test_pml(one, mydirname)) abort("error in test_pml vacuum\n"); for (int s=2;s<7;s++) if (!test_periodic(targets, s, mydirname)) abort("error in test_periodic targets\n"); for (int s=2;s<8;s++) if (!test_metal(one, s, mydirname)) abort("error in test_metal vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_splitting(one, s, mydirname)) abort("error in test_pml_splitting vacuum\n"); return 0; } meep-1.3/tests/near2far.cpp0000644000175400001440000001366412506540456012613 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Check of Green's functions (analytical vs. numerical) and near-to-far-field transformation. */ #include #include #include using namespace meep; using namespace std; double two(const vec &) { return 2.0; } const int EHcomp[10] = {0,1,0,1,2, 3,4,3,4,5}; int check_2d_3d(ndim dim, const double xmax, double a, component c0) { const double dpml = 1; if (dim != D2 && dim != D3) abort("2d or 3d required"); grid_volume gv = dim == D2 ? vol2d(xmax + 2*dpml,xmax + 2*dpml,a) : vol3d(xmax + 2*dpml,xmax + 2*dpml,xmax + 2*dpml,a); gv.center_origin(); if (!gv.has_field(c0)) return 1; master_printf("TESTING %s AT RESOLUTION %g FOR %s SOURCE...\n", dim == D2 ? "2D" : "3D", a, component_name(c0)); structure s(gv, two, pml(dpml)); fields f(&s); double w = 0.30; continuous_src_time src(w); f.add_point_source(c0, src, zero_vec(dim)); f.solve_cw(1e-6); FOR_E_AND_H(c) if (gv.has_field(c)) { const int N = 20; double dx = 0.75 * (xmax/4) / N; complex F[N], F0[N], EH[6]; double diff = 0.0, dot0 = 0.0, dot = 0.0; complex phase = polar(1.0, (4*w*f.dt)*pi); vec x0 = zero_vec(dim); for (int i = 0; i < N; ++i) { double s = xmax/4 + dx*i; vec x = dim == D2 ? vec(s, 0.5*s) : vec(s, 0.5*s, 0.3*s); F[i] = f.get_field(c, x) * phase; (dim == D2 ? green2d : green3d)(EH, x, w, 2.0, 1.0, x0, c0, 1.0); F0[i] = EH[EHcomp[c]]; double d = abs(F0[i] - F[i]); double f = abs(F[i]); double f0 = abs(F0[i]); diff += d*d; dot += f*f; dot0 += f0*f0; } if (dot0 == 0) continue; /* zero field component */ double relerr = sqrt(diff) / sqrt(dot0); master_printf(" GREEN: %s -> %s, resolution %g: relerr = %g\n", component_name(c0), component_name(c), a, relerr); if (relerr > 0.05 * 30/a) { for (int i = 0; i < N; ++i) master_printf("%g, %g,%g, %g,%g\n", xmax/4 + dx*i, real(F[i]), imag(F[i]), real(F0[i]), imag(F0[i])); return 0; } } const double L = xmax/4; volume_list vl = dim == D2 ? volume_list( volume(vec(-L,+L),vec(+L,+L)), Sy, 1.0, new volume_list(volume(vec(+L,+L),vec(+L,-L)), Sx, 1.0, new volume_list(volume(vec(-L,-L),vec(+L,-L)), Sy, -1.0, new volume_list(volume(vec(-L,-L),vec(-L,+L)), Sx, -1.0)))) : volume_list( volume(vec(+L,-L,-L),vec(+L,+L,+L)), Sx, +1., new volume_list(volume(vec(-L,-L,-L),vec(-L,+L,+L)), Sx, -1., new volume_list(volume(vec(-L,+L,-L),vec(+L,+L,+L)), Sy, +1., new volume_list(volume(vec(-L,-L,-L),vec(+L,-L,+L)), Sy, -1., new volume_list(volume(vec(-L,-L,+L),vec(+L,+L,+L)), Sz, +1., new volume_list(volume(vec(-L,-L,-L),vec(+L,+L,-L)), Sz, -1. )))))); dft_near2far n2f = f.add_dft_near2far(&vl, w, w, 1); f.update_dfts(); n2f.scale_dfts(sqrt(2*pi)/f.dt); // cancel time-integration factor FOR_E_AND_H(c) if (gv.has_field(c)) { const int N = 20; double dx = 0.75 * (xmax/4) / N; complex F[N], F0[N], EH_[6], EH[6]; double diff = 0.0, dot = 0.0; complex phase = polar(1.0, (4*w*f.dt)*pi); vec x0 = zero_vec(dim); for (int i = 0; i < N; ++i) { double s = xmax + dx*i; vec x = dim == D2 ? vec(s, 0.5*s) : vec(s, 0.5*s, 0.3*s); n2f.farfield_lowlevel(EH_, x); sum_to_all(EH_, EH, 6); F[i] = EH[EHcomp[c]] * phase; (dim == D2 ? green2d : green3d)(EH, x, w, 2.0, 1.0, x0, c0, 1.0); F0[i] = EH[EHcomp[c]]; double d = abs(F0[i] - F[i]); double f0 = abs(F0[i]); diff += d*d; dot += f0*f0; } if (dot == 0) continue; /* zero field component */ double relerr = sqrt(diff) / sqrt(dot); master_printf(" NEAR2FAR: %s -> %s, resolution %g: relerr = %g\n", component_name(c0), component_name(c), a, relerr); if (relerr > 0.05 * 30/a) { for (int i = 0; i < N; ++i) master_printf("%g, %g,%g, %g,%g\n", xmax + dx*i, real(F[i]), imag(F[i]), real(F0[i]), imag(F0[i])); return 0; } } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); const double a2d = argc > 1 ? atof(argv[1]) : 20, a3d = argc > 1 ? a2d : 10; #if 0 FOR_E_AND_H(c0) if (!check_2d_3d(D3, 4, a3d, c0)) return 1; #else if (!check_2d_3d(D3, 4, a3d, Ez)) return 1; if (!check_2d_3d(D3, 4, a3d, Hz)) return 1; #endif FOR_E_AND_H(c0) if (!check_2d_3d(D2, 8, a2d, c0)) return 1; return 0; } meep-1.3/Makefile.am0000644000175400001440000000057412322770465011276 00000000000000if WITH_LIBCTL LIBCTL = libctl else LIBCTL = endif ACLOCAL_AMFLAGS=-I m4 SUBDIRS = src $(LIBCTL) tests examples EXTRA_DIST = COPYRIGHT m4 meep-pkgconfig.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = meep@MEEP_SUFFIX@.pc meep@MEEP_SUFFIX@.pc: meep-pkgconfig cp -f $(top_builddir)/meep-pkgconfig $@ libmeep: cd src && $(MAKE) DISTCLEANFILES = meep@MEEP_SUFFIX@.pc meep-1.3/ltmain.sh0000644000175400001440000105152212235234705011055 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 meep-1.3/INSTALL0000644000175400001440000003660512235234727010276 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. 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 warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. meep-1.3/missing0000755000175400001440000001533112235234727010635 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-1.3/aclocal.m40000644000175400001440000012775512506540650011110 00000000000000# generated automatically by aclocal 1.14 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/acx_blas.m4]) m4_include([m4/acx_lapack.m4]) m4_include([m4/acx_mpi.m4]) m4_include([m4/ax_check_compiler_flags.m4]) m4_include([m4/ax_compiler_vendor.m4]) m4_include([m4/ax_cxx_maxopt.m4]) m4_include([m4/ax_gcc_archflag.m4]) m4_include([m4/ax_gcc_x86_cpuid.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) meep-1.3/src/0000755000175400001440000000000012506541113010071 500000000000000meep-1.3/src/dft.cpp0000644000175400001440000003557312506540456011320 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { struct dft_chunk_data { // for passing to field::loop_in_chunks as void* double omega_min, domega; int Nomega; component c; int vc; complex weight, extra_weight; bool include_dV_and_interp_weights; bool sqrt_dV_and_interp_weights; dft_chunk *dft_chunks; }; dft_chunk::dft_chunk(fields_chunk *fc_, ivec is_, ivec ie_, vec s0_, vec s1_, vec e0_, vec e1_, double dV0_, double dV1_, complex extra_weight_, complex scale_, component c_, bool use_centered_grid, ivec shift_, const symmetry &S_, int sn_, int vc_, const void *data_) { dft_chunk_data *data = (dft_chunk_data *) data_; if (!fc_->f[c_][0]) abort("invalid fields_chunk/component combination in dft_chunk"); fc = fc_; is = is_; ie = ie_; s0 = s0_; s1 = s1_; e0 = e0_; e1 = e1_; if (data->include_dV_and_interp_weights) { dV0 = dV0_; dV1 = dV1_; } else { /* this is for e.g. computing E x H, where we don't want to multiply by the interpolation weights or the grid_volume twice. */ dV0 = 1; dV1 = 0; LOOP_OVER_DIRECTIONS(fc->gv.dim, d) { s0.set_direction(d, 1.0); s1.set_direction(d, 1.0); e0.set_direction(d, 1.0); e1.set_direction(d, 1.0); } } /* an alternative way to avoid multipling by interpolation weights twice: multiply by square root of the weights */ sqrt_dV_and_interp_weights = data->sqrt_dV_and_interp_weights; scale = scale_ * data->weight; extra_weight = extra_weight_; c = c_; if (use_centered_grid) fc->gv.yee2cent_offsets(c, avg1, avg2); else avg1 = avg2 = 0; shift = shift_; S = S_; sn = sn_; vc = vc_; omega_min = data->omega_min; domega = data->domega; Nomega = data->Nomega; dft_phase = new complex[Nomega]; N = 1; LOOP_OVER_DIRECTIONS(is.dim, d) N *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; dft = new complex[N * Nomega]; for (int i = 0; i < N * Nomega; ++i) dft[i] = 0.0; next_in_chunk = fc->dft_chunks; fc->dft_chunks = this; next_in_dft = data->dft_chunks; } dft_chunk::~dft_chunk() { delete[] dft; delete[] dft_phase; // delete from fields_chunk list dft_chunk *cur = fc->dft_chunks; if (cur == this) fc->dft_chunks = next_in_chunk; else { while (cur && cur->next_in_chunk && cur->next_in_chunk != this) cur = cur->next_in_chunk; if (cur && cur->next_in_chunk == this) cur->next_in_chunk = next_in_chunk; } } void dft_flux::remove() { while (E) { dft_chunk *nxt = E->next_in_dft; delete E; E = nxt; } while (H) { dft_chunk *nxt = H->next_in_dft; delete H; H = nxt; } } static void add_dft_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *chunkloop_data) { dft_chunk_data *data = (dft_chunk_data *) chunkloop_data; (void) ichunk; // unused component c = S.transform(data->c, -sn); if (c >= NUM_FIELD_COMPONENTS || !fc->f[c][0]) return; // this chunk doesn't have component c data->dft_chunks = new dft_chunk(fc,is,ie,s0,s1,e0,e1,dV0,dV1, data->extra_weight, shift_phase * S.phase_shift(c, sn), c, cgrid == Centered, shift, S, sn, data->vc, chunkloop_data); } dft_chunk *fields::add_dft(component c, const volume &where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights, complex weight, dft_chunk *chunk_next, bool sqrt_dV_and_interp_weights, complex extra_weight, bool use_centered_grid, int vc) { if (coordinate_mismatch(gv.dim, c)) return NULL; dft_chunk_data data; data.c = c; data.vc = vc; if (Nfreq <= 1) freq_min = freq_max = (freq_min + freq_max) * 0.5; data.omega_min = freq_min * 2*pi; data.domega = Nfreq <= 1 ? 0.0 : (freq_max * 2*pi - data.omega_min) / (Nfreq - 1); data.Nomega = Nfreq; data.include_dV_and_interp_weights = include_dV_and_interp_weights; data.sqrt_dV_and_interp_weights = sqrt_dV_and_interp_weights; data.dft_chunks = chunk_next; data.weight = weight * (dt/sqrt(2*pi)); data.extra_weight = extra_weight; loop_in_chunks(add_dft_chunkloop, (void *) &data, where, use_centered_grid ? Centered : c); return data.dft_chunks; } dft_chunk *fields::add_dft(const volume_list *where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights) { dft_chunk *chunks = 0; while (where) { if (is_derived(where->c)) abort("derived_component invalid for dft"); chunks = add_dft(component(where->c), where->v, freq_min, freq_max, Nfreq, include_dV_and_interp_weights, where->weight, chunks); where = where->next; } return chunks; } dft_chunk *fields::add_dft_pt(component c, const vec &where, double freq_min, double freq_max, int Nfreq) { return add_dft(c, where, freq_min, freq_max, Nfreq, false); } void fields::update_dfts() { am_now_working_on(FourierTransforming); for (int i = 0; i < num_chunks; i++) if (chunks[i]->is_mine()) chunks[i]->update_dfts(time(), time() - 0.5 * dt); finished_working(); } void fields_chunk::update_dfts(double timeE, double timeH) { for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_chunk) { cur->update_dft(is_magnetic(cur->c) ? timeH : timeE); } } void dft_chunk::update_dft(double time) { if (!fc->f[c][0]) return; for (int i = 0; i < Nomega; ++i) dft_phase[i] = polar(1.0, (omega_min + i*domega)*time) * scale; int numcmp = fc->f[c][1] ? 2 : 1; int idx_dft = 0; LOOP_OVER_IVECS(fc->gv, is, ie, idx) { double w = IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); if (sqrt_dV_and_interp_weights) w = sqrt(w); double f[2]; // real/imag field value at epsilon point if (avg2) for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = (w * 0.25) * (fc->f[c][cmp][idx] + fc->f[c][cmp][idx+avg1] + fc->f[c][cmp][idx+avg2] + fc->f[c][cmp][idx+(avg1+avg2)]); else if (avg1) for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = (w * 0.5) * (fc->f[c][cmp][idx] + fc->f[c][cmp][idx+avg1]); else for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = w * fc->f[c][cmp][idx]; if (numcmp == 2) { complex fc(f[0], f[1]); for (int i = 0; i < Nomega; ++i) dft[Nomega * idx_dft + i] += dft_phase[i] * fc; } else { realnum fr = f[0]; for (int i = 0; i < Nomega; ++i) dft[Nomega * idx_dft + i] += dft_phase[i] * fr; } idx_dft++; } } void dft_chunk::scale_dft(complex scale) { for (int i = 0; i < N * Nomega; ++i) dft[i] *= scale; if (next_in_dft) next_in_dft->scale_dft(scale); } void dft_chunk::operator-=(const dft_chunk &chunk) { if (c != chunk.c || N * Nomega != chunk.N * chunk.Nomega) abort("Mismatched chunks in dft_chunk::operator-="); for (int i = 0; i < N * Nomega; ++i) dft[i] -= chunk.dft[i]; if (next_in_dft) { if (!chunk.next_in_dft) abort("Mismatched chunk lists in dft_chunk::operator-="); *next_in_dft -= *chunk.next_in_dft; } } static int dft_chunks_Ntotal(dft_chunk *dft_chunks, int *my_start) { int n = 0; for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) n += cur->N * cur->Nomega * 2; *my_start = partial_sum_to_all(n) - n; // sum(n) for processes before this return sum_to_all(n); } // Note: the file must have been created in parallel mode, typically via fields::open_h5file. void save_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix) { int istart; int n = dft_chunks_Ntotal(dft_chunks, &istart); char dataname[1024]; snprintf(dataname, 1024, "%s%s" "%s_dft", dprefix ? dprefix : "", dprefix && dprefix[0] ? "_" : "", name); file->create_data(dataname, 1, &n); for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) { int Nchunk = cur->N * cur->Nomega * 2; file->write_chunk(1, &istart, &Nchunk, (realnum *) cur->dft); istart += Nchunk; } file->done_writing_chunks(); } void save_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix) { save_dft_hdf5(dft_chunks, component_name(c), file, dprefix); } void load_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix) { int istart; int n = dft_chunks_Ntotal(dft_chunks, &istart); char dataname[1024]; snprintf(dataname, 1024, "%s%s" "%s_dft", dprefix ? dprefix : "", dprefix && dprefix[0] ? "_" : "", name); int file_rank, file_dims; file->read_size(dataname, &file_rank, &file_dims, 1); if (file_rank != 1 || file_dims != n) abort("incorrect dataset size (%d vs. %d) in load_dft_hdf5 %s:%s", file_dims, n, file->file_name(), dataname); for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) { int Nchunk = cur->N * cur->Nomega * 2; file->read_chunk(1, &istart, &Nchunk, (realnum *) cur->dft); istart += Nchunk; } } void load_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix) { load_dft_hdf5(dft_chunks, component_name(c), file, dprefix); } dft_flux::dft_flux(const component cE_, const component cH_, dft_chunk *E_, dft_chunk *H_, double fmin, double fmax, int Nf) { if (Nf <= 1) fmin = fmax = (fmin + fmax) * 0.5; freq_min = fmin; Nfreq = Nf; dfreq = Nf <= 1 ? 0.0 : (fmax - fmin) / (Nf - 1); E = E_; H = H_; cE = cE_; cH = cH_; } dft_flux::dft_flux(const dft_flux &f) { freq_min = f.freq_min; Nfreq = f.Nfreq; dfreq = f.dfreq; E = f.E; H = f.H; cE = f.cE; cH = f.cH; } double *dft_flux::flux() { double *F = new double[Nfreq]; for (int i = 0; i < Nfreq; ++i) F[i] = 0; for (dft_chunk *curE = E, *curH = H; curE && curH; curE = curE->next_in_dft, curH = curH->next_in_dft) for (int k = 0; k < curE->N; ++k) for (int i = 0; i < Nfreq; ++i) F[i] += real(curE->dft[k*Nfreq + i] * conj(curH->dft[k*Nfreq + i])); double *Fsum = new double[Nfreq]; sum_to_all(F, Fsum, Nfreq); delete[] F; return Fsum; } void dft_flux::save_hdf5(h5file *file, const char *dprefix) { save_dft_hdf5(E, cE, file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(H, cH, file, dprefix); } void dft_flux::load_hdf5(h5file *file, const char *dprefix) { load_dft_hdf5(E, cE, file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(H, cH, file, dprefix); } void dft_flux::save_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::WRITE, prefix); save_hdf5(ff, dprefix); delete ff; } void dft_flux::load_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::READONLY, prefix); load_hdf5(ff, dprefix); delete ff; } void dft_flux::scale_dfts(complex scale) { if (E) E->scale_dft(scale); if (H) H->scale_dft(scale); } dft_flux fields::add_dft_flux(const volume_list *where_, double freq_min, double freq_max, int Nfreq) { dft_chunk *E = 0, *H = 0; component cE[2] = {Ex,Ey}, cH[2] = {Hy,Hx}; volume_list *where = S.reduce(where_); volume_list *where_save = where; while (where) { derived_component c = derived_component(where->c); if (coordinate_mismatch(gv.dim, component_direction(c))) abort("coordinate-type mismatch in add_dft_flux"); switch (c) { case Sx: cE[0] = Ey, cE[1] = Ez, cH[0] = Hz, cH[1] = Hy; break; case Sy: cE[0] = Ez, cE[1] = Ex, cH[0] = Hx, cH[1] = Hz; break; case Sr: cE[0] = Ep, cE[1] = Ez, cH[0] = Hz, cH[1] = Hp; break; case Sp: cE[0] = Ez, cE[1] = Er, cH[0] = Hr, cH[1] = Hz; break; case Sz: if (gv.dim == Dcyl) cE[0] = Er, cE[1] = Ep, cH[0] = Hp, cH[1] = Hr; else cE[0] = Ex, cE[1] = Ey, cH[0] = Hy, cH[1] = Hx; break; default: abort("invalid flux component!"); } for (int i = 0; i < 2; ++i) { E = add_dft(cE[i], where->v, freq_min, freq_max, Nfreq, true, where->weight * double(1 - 2*i), E); H = add_dft(cH[i], where->v, freq_min, freq_max, Nfreq, false, 1.0, H); } where = where->next; } delete where_save; return dft_flux(cE[0], cH[0], E, H, freq_min, freq_max, Nfreq); } direction fields::normal_direction(const volume &where) const { direction d = where.normal_direction(); if (d == NO_DIRECTION) { /* hack so that we still infer the normal direction correctly for volumes with empty dimensions */ volume where_pad(where); LOOP_OVER_DIRECTIONS(where.dim, d1) if (nosize_direction(d1) && where.in_direction(d1) == 0.0) where_pad.set_direction_max(d1, where.in_direction_min(d1) + 0.1); d = where_pad.normal_direction(); if (d == NO_DIRECTION) abort("Could not determine normal direction for given grid_volume."); } return d; } dft_flux fields::add_dft_flux(direction d, const volume &where, double freq_min, double freq_max, int Nfreq) { if (d == NO_DIRECTION) d = normal_direction(where); volume_list vl(where, direction_component(Sx, d)); return add_dft_flux(&vl, freq_min, freq_max, Nfreq); } dft_flux fields::add_dft_flux_box(const volume &where, double freq_min, double freq_max, int Nfreq){ volume_list *faces = 0; LOOP_OVER_DIRECTIONS(where.dim, d) if (where.in_direction(d) > 0) { volume face(where); derived_component c = direction_component(Sx, d); face.set_direction_min(d, where.in_direction_max(d)); faces = new volume_list(face, c, +1, faces); face.set_direction_min(d, where.in_direction_min(d)); face.set_direction_max(d, where.in_direction_min(d)); faces = new volume_list(face, c, -1, faces); } dft_flux flux = add_dft_flux(faces, freq_min, freq_max, Nfreq); delete faces; return flux; } dft_flux fields::add_dft_flux_plane(const volume &where, double freq_min, double freq_max, int Nfreq) { return add_dft_flux(NO_DIRECTION, where, freq_min, freq_max, Nfreq); } } // namespace meep meep-1.3/src/dft_ldos.cpp0000644000175400001440000001145512506540456012332 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { dft_ldos::dft_ldos(double freq_min, double freq_max, int Nfreq) { if (Nfreq <= 1) { omega_min = (freq_min + freq_max) * pi; domega = 0; Nomega = 1; } else { omega_min = freq_min * 2*pi; domega = (freq_max - freq_min) * 2*pi / Nfreq; Nomega = Nfreq; } Fdft = new complex[Nomega]; Jdft = new complex[Nomega]; for (int i = 0; i < Nomega; ++i) Fdft[i] = Jdft[i] = 0.0; Jsum = 1.0; } // |c|^2 static double abs2(complex c) {return real(c)*real(c)+imag(c)*imag(c);} double *dft_ldos::ldos() const { // we try to get the overall scale factor right (at least for a point source) // so that we can compare against the analytical formula for testing // ... in most practical cases, the scale factor won't matter because // the user will compute the relative LDOS of 2 cases (e.g. LDOS/vacuum) // overall scale factor double Jsum_all = sum_to_all(Jsum); double scale = 4.0/pi // from definition of LDOS comparison to power * -0.5 // power = -1/2 Re[E* J] / (Jsum_all * Jsum_all); // normalize to unit-integral current double *sum = new double[Nomega]; for (int i = 0; i < Nomega; ++i) /* 4/pi * work done by unit dipole */ sum[i] = scale * real(Fdft[i] * conj(Jdft[i])) / abs2(Jdft[i]); double *out = new double[Nomega]; sum_to_all(sum, out, Nomega); delete[] sum; return out; } complex *dft_ldos::F() const { complex *out = new complex[Nomega]; sum_to_all(Fdft, out, Nomega); return out; } complex *dft_ldos::J() const { complex *out = new complex[Nomega]; sum_to_all(Jdft, out, Nomega); return out; } void dft_ldos::update(fields &f) { complex EJ = 0.0; // integral E * J* complex HJ = 0.0; // integral H * J* for magnetic currents double scale = (f.dt/sqrt(2*pi)); // compute Jsum for LDOS normalization purposes // ...don't worry about the tiny inefficiency of recomputing this repeatedly Jsum = 0.0; for (int ic=0;icis_mine()) { for (src_vol *sv = f.chunks[ic]->sources[D_stuff]; sv; sv = sv->next) { component c = direction_component(Ex, component_direction(sv->c)); realnum *fr = f.chunks[ic]->f[c][0]; realnum *fi = f.chunks[ic]->f[c][1]; if (fr && fi) // complex E for (int j=0; jnpts; j++) { const int idx = sv->index[j]; const complex A = sv->A[j]; EJ += complex(fr[idx],fi[idx]) * conj(A); Jsum += abs(A); } else if (fr) { // E is purely real for (int j=0; jnpts; j++) { const int idx = sv->index[j]; const complex A = sv->A[j]; EJ += double(fr[idx]) * conj(A); Jsum += abs(A); } } } for (src_vol *sv = f.chunks[ic]->sources[B_stuff]; sv; sv = sv->next) { component c = direction_component(Hx, component_direction(sv->c)); realnum *fr = f.chunks[ic]->f[c][0]; realnum *fi = f.chunks[ic]->f[c][1]; if (fr && fi) // complex H for (int j=0; jnpts; j++) { const int idx = sv->index[j]; const complex A = sv->A[j]; HJ += complex(fr[idx],fi[idx]) * conj(A); Jsum += abs(A); } else if (fr) { // H is purely real for (int j=0; jnpts; j++) { const int idx = sv->index[j]; const complex A = sv->A[j]; HJ += double(fr[idx]) * conj(A); Jsum += abs(A); } } } } for (int i = 0; i < Nomega; ++i) { complex Ephase = polar(1.0, (omega_min+i*domega)*f.time())*scale; complex Hphase = polar(1.0, (omega_min+i*domega)*(f.time()-f.dt/2))*scale; Fdft[i] += Ephase * EJ + Hphase * HJ; // NOTE: take only 1st time dependence: assumes all sources have same J(t) if (f.sources) { if (f.is_real) // todo: not quite right if A is complex Jdft[i] += Ephase * real(f.sources->current()); else Jdft[i] += Ephase * f.sources->current(); } } // correct for dV factors Jsum *= sqrt(f.gv.dV(f.gv.icenter(),1).computational_volume()); } } meep-1.3/src/Makefile.am0000644000175400001440000000274312506314611012054 00000000000000lib_LTLIBRARIES = libmeep@MEEP_SUFFIX@.la include_HEADERS = meep.hpp pkginclude_HEADERS = meep/mympi.hpp meep/vec.hpp AM_CPPFLAGS = -I$(top_srcdir)/src BUILT_SOURCES = sphere-quad.h step_generic_stride1.cpp HDRS = meep.hpp meep_internals.hpp meep/mympi.hpp meep/vec.hpp \ bicgstab.hpp libmeep@MEEP_SUFFIX@_la_SOURCES = anisotropic_averaging.cpp bands.cpp \ boundaries.cpp bicgstab.cpp casimir.cpp control_c.cpp cw_fields.cpp \ dft.cpp dft_ldos.cpp energy_and_flux.cpp fields.cpp loop_in_chunks.cpp \ grace.cpp h5fields.cpp h5file.cpp initialize.cpp integrate.cpp \ integrate2.cpp monitor.cpp mympi.cpp multilevel-atom.cpp near2far.cpp \ output_directory.cpp random.cpp sources.cpp step.cpp step_db.cpp \ stress.cpp structure.cpp susceptibility.cpp time.cpp update_eh.cpp \ mpb.cpp update_pols.cpp vec.cpp step_generic.cpp $(HDRS) \ $(BUILT_SOURCES) libmeep@MEEP_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ PRELUDE = "/* This file was automatically generated --- DO NOT EDIT */" noinst_PROGRAMS = sphere_quad sphere_quad_SOURCES = sphere-quad.cpp SPHERE_QUAD = $(top_builddir)/src/sphere_quad sphere-quad.h: make sphere_quad (echo $(PRELUDE); echo; $(SPHERE_QUAD)) > $@ step_generic_stride1.cpp: step_generic.cpp (echo $(PRELUDE); echo; sed 's/LOOP_OVER/S1LOOP_OVER/g' $(top_srcdir)/src/step_generic.cpp | sed 's/step_curl/step_curl_stride1/' | sed 's/step_update_EDHB/step_update_EDHB_stride1/' | sed 's/step_beta/step_beta_stride1/') > $@ MAINTAINERCLEANFILES = $(BUILT_SOURCES) meep-1.3/src/update_eh.cpp0000644000175400001440000001636212506540456012474 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { void fields::update_eh(field_type ft, bool skip_w_components) { if (ft != E_stuff && ft != H_stuff) abort("update_eh only works with E/H"); for (int i=0;iis_mine()) if (chunks[i]->update_eh(ft, skip_w_components)) chunk_connections_valid = false; // E/H allocated - reconnect chunks /* synchronize to avoid deadlocks if one process decides it needs to allocate E or H ... */ chunk_connections_valid = and_to_all(chunk_connections_valid); } bool fields_chunk::needs_W_prev(component c) const { for (susceptibility *chiP = s->chiP[type(c)]; chiP; chiP = chiP->next) if (chiP->needs_W_prev()) return true; return false; } bool fields_chunk::update_eh(field_type ft, bool skip_w_components) { field_type ft2 = ft == E_stuff ? D_stuff : B_stuff; // for sources etc. bool allocated_eh = false; bool have_int_sources = false; if (!doing_solve_cw) { for (src_vol *sv = sources[ft2]; sv; sv = sv->next) if (sv->t->is_integrated) { have_int_sources = true; break; } } FOR_FT_COMPONENTS(ft, ec) { component dc = field_type_component(ft2, ec); DOCMP { bool need_fmp = false; if (f[ec][cmp]) { need_fmp = have_int_sources; for (polarization_state *p = pol[ft]; p && !need_fmp; p = p->next) need_fmp = need_fmp || p->s->needs_P(ec, cmp, f); } if (need_fmp) { if (!f_minus_p[dc][cmp]) f_minus_p[dc][cmp] = new realnum[gv.ntot()]; } else if (f_minus_p[dc][cmp]) { // remove unneeded f_minus_p delete[] f_minus_p[dc][cmp]; f_minus_p[dc][cmp] = 0; } } } bool have_f_minus_p = false; FOR_FT_COMPONENTS(ft2, dc) if (f_minus_p[dc][0]) { have_f_minus_p = true; break; } const int ntot = s->gv.ntot(); if (have_f_minus_p && doing_solve_cw) abort("dispersive materials are not yet implemented for solve_cw"); ////////////////////////////////////////////////////////////////////////// // First, initialize f_minus_p to D - P, if necessary FOR_FT_COMPONENTS(ft, ec) if (f[ec][0]) { component dc = field_type_component(ft2, ec); DOCMP if (f_minus_p[dc][cmp]) { realnum *fmp = f_minus_p[dc][cmp]; memcpy(fmp, f[dc][cmp], sizeof(realnum) * ntot); } } for (polarization_state *p = pol[ft]; p; p = p->next) if (p->data) p->s->subtract_P(ft, f_minus_p, p->data); ////////////////////////////////////////////////////////////////////////// // Next, subtract time-integrated sources (i.e. polarizations, not currents) if (have_f_minus_p && !doing_solve_cw) { for (src_vol *sv = sources[ft2]; sv; sv = sv->next) { if (sv->t->is_integrated && f[sv->c][0] && ft == type(sv->c)) { component c = field_type_component(ft2, sv->c); for (int j = 0; j < sv->npts; ++j) { const complex A = sv->dipole(j); DOCMP { f_minus_p[c][cmp][sv->index[j]] -= (cmp) ? imag(A) : real(A); } } } } } ////////////////////////////////////////////////////////////////////////// // Finally, compute E = chi1inv * D realnum *dmp[NUM_FIELD_COMPONENTS][2]; FOR_FT_COMPONENTS(ft2,dc) DOCMP2 dmp[dc][cmp] = f_minus_p[dc][cmp] ? f_minus_p[dc][cmp] : f[dc][cmp]; DOCMP FOR_FT_COMPONENTS(ft,ec) if (f[ec][cmp]) { if (type(ec) != ft) abort("bug in FOR_FT_COMPONENTS"); component dc = field_type_component(ft2, ec); const direction d_ec = component_direction(ec); const int s_ec = gv.stride(d_ec) * (ft == H_stuff ? -1 : +1); const direction d_1 = cycle_direction(gv.dim, d_ec, 1); const component dc_1 = direction_component(dc,d_1); const int s_1 = gv.stride(d_1) * (ft == H_stuff ? -1 : +1); const direction d_2 = cycle_direction(gv.dim, d_ec, 2); const component dc_2 = direction_component(dc,d_2); const int s_2 = gv.stride(d_2) * (ft == H_stuff ? -1 : +1); direction dsigw0 = d_ec; direction dsigw = s->sigsize[dsigw0] > 1 ? dsigw0 : NO_DIRECTION; // lazily allocate any E/H fields that are needed (H==B initially) if (f[ec][cmp] == f[dc][cmp] && (s->chi1inv[ec][d_ec] || have_f_minus_p || dsigw != NO_DIRECTION)) { f[ec][cmp] = new realnum[gv.ntot()]; memcpy(f[ec][cmp], f[dc][cmp], gv.ntot() * sizeof(realnum)); allocated_eh = true; } // lazily allocate W auxiliary field if (!f_w[ec][cmp] && dsigw != NO_DIRECTION) { f_w[ec][cmp] = new realnum[gv.ntot()]; memcpy(f_w[ec][cmp], f[ec][cmp], gv.ntot() * sizeof(realnum)); if (needs_W_notowned(ec)) allocated_eh = true; // communication needed } // for solve_cw, when W exists we get W and E from special variables if (f_w[ec][cmp] && skip_w_components) continue; // save W field from this timestep in f_w_prev if needed by pols if (needs_W_prev(ec)) { if (!f_w_prev[ec][cmp]) f_w_prev[ec][cmp] = new realnum[gv.ntot()]; memcpy(f_w_prev[ec][cmp], f_w[ec][cmp] ? f_w[ec][cmp] : f[ec][cmp], sizeof(realnum) * gv.ntot()); } if (f[ec][cmp] != f[dc][cmp]) STEP_UPDATE_EDHB(f[ec][cmp], ec, gv, dmp[dc][cmp], dmp[dc_1][cmp], dmp[dc_2][cmp], s->chi1inv[ec][d_ec], dmp[dc_1][cmp]?s->chi1inv[ec][d_1]:NULL, dmp[dc_2][cmp]?s->chi1inv[ec][d_2]:NULL, s_ec, s_1, s_2, s->chi2[ec], s->chi3[ec], f_w[ec][cmp], dsigw, s->sig[dsigw], s->kap[dsigw]); } /* Do annoying special cases for r=0 in cylindrical coords. Note that this only really matters for field output; the Ez and Ep components at r=0 don't usually affect the fields elsewhere because of the form of Maxwell's equations in cylindrical coords. */ // (FIXME: handle Kerr case? Do we care about auxiliary PML fields here?) if (gv.dim == Dcyl && gv.origin_r() == 0.0) DOCMP FOR_FT_COMPONENTS(ft,ec) if (f[ec][cmp] && (ec == Ep || ec == Ez || ec == Hr)) { component dc = field_type_component(ft2, ec); if (f[ec][cmp] == f[dc][cmp]) continue; const int yee_idx = gv.yee_index(ec); const int d_ec = component_direction(ec); const int sR = gv.stride(R), nZ = gv.num_direction(Z); realnum *E = f[ec][cmp]; const realnum *D = f_minus_p[dc][cmp] ? f_minus_p[dc][cmp] : f[dc][cmp]; const realnum *chi1inv = s->chi1inv[ec][d_ec]; if (chi1inv) for (int iZ=0; iZ namespace meep { const int NUM_FIELD_COMPONENTS = 20; const int NUM_FIELD_TYPES = 8; enum component { Ex=0, Ey, Er, Ep, Ez, Hx, Hy, Hr, Hp, Hz, Dx, Dy, Dr, Dp, Dz, Bx, By, Br, Bp, Bz, Dielectric, Permeability }; #define Centered Dielectric // better name for centered "dielectric" grid enum derived_component { Sx=100, Sy, Sr, Sp, Sz, EnergyDensity, D_EnergyDensity, H_EnergyDensity }; enum ndim { D1=0, D2, D3, Dcyl }; enum field_type { E_stuff=0, H_stuff=1, D_stuff=2, B_stuff=3, PE_stuff=4, PH_stuff=5, WE_stuff=6, WH_stuff=7 }; enum boundary_side { High=0, Low }; enum direction { X=0,Y,Z,R,P, NO_DIRECTION }; struct signed_direction { signed_direction(direction dd=X,bool f=false, std::complex ph=1.0) { d = dd; flipped = f; phase = ph; }; signed_direction(const signed_direction &sd) { d = sd.d; flipped = sd.flipped; phase = sd.phase; } signed_direction operator*(std::complex ph); bool operator==(const signed_direction &sd) const { return (d == sd.d && flipped == sd.flipped && phase == sd.phase); } bool operator!=(const signed_direction &sd) const { return !(*this == sd); } direction d; bool flipped; std::complex phase; }; inline int number_of_directions(ndim dim) { return (int) (dim + 1 - 2 * (dim == Dcyl)); } inline direction start_at_direction(ndim dim) { return (direction) (((dim == D1) || (dim == Dcyl)) ? 2 : 0); } inline direction stop_at_direction(ndim dim) { return (direction) (dim + 1 + 2 * (dim == D1)); } component first_field_component(field_type ft); #define FOR_FIELD_TYPES(ft) for (meep::field_type ft = meep::E_stuff; \ ft <= meep::WH_stuff; \ ft = (meep::field_type) (ft+1)) #define FOR_ELECTRIC_COMPONENTS(c) for (meep::component c = meep::Ex; \ c < meep::Hx; \ c = (meep::component) (c+1)) #define FOR_MAGNETIC_COMPONENTS(c) for (meep::component c = meep::Hz; \ c > meep::Ez; \ c = (meep::component) (c-1)) #define FOR_B_COMPONENTS(c) for (meep::component c = meep::Bz; \ c > meep::Dz; c = (meep::component) (c-1)) #define FOR_H_AND_B(h,b) for (meep::component h=meep::Hx, b=meep::Bx; \ h <= meep::Hz; \ h = (meep::component) (h+1), \ b = (meep::component) (b+1)) #define FOR_D_COMPONENTS(c) for (meep::component c = meep::Dz; \ c > meep::Hz; c = (meep::component) (c-1)) #define FOR_E_AND_D(e,d) for (meep::component e = meep::Ex, d = meep::Dx; \ e <= meep::Ez; e = (meep::component) (e+1), \ d = (component) (d+1)) #define FOR_E_AND_H(c) for (meep::component c = meep::Ex; c < meep::Dx; \ c = (meep::component) (c+1)) #define FOR_D_AND_B(c) for (meep::component c = meep::Dx; \ c < meep::Dielectric; c = (meep::component) (c+1)) #define FOR_FT_COMPONENTS(ft,c) for (meep::component c = meep::first_field_component(ft), loop_cstop = meep::component(meep::first_field_component(ft) + 5); c < loop_cstop; c = meep::component(c+1)) #define FOR_COMPONENTS(c) for (meep::component c = meep::Ex, \ loop_stop_co = meep::Ey; \ c != loop_stop_co; \ c = (meep::component)((c+1) % \ meep::NUM_FIELD_COMPONENTS), \ loop_stop_co = meep::Ex) #define FOR_DIRECTIONS(d) for (meep::direction d = meep::X, \ loop_stop_di = meep::Y; \ d != loop_stop_di; \ d = (meep::direction)((d+1)%5), \ loop_stop_di = meep::X) #define FOR_SIDES(s) for (meep::boundary_side s = meep::High, \ loop_stop_bi = meep::Low; \ s != loop_stop_bi; \ s = (meep::boundary_side) ((s+1) % 2), \ loop_stop_bi = meep::High) // only loop over directions where we have coordinates #define LOOP_OVER_DIRECTIONS(dim, d) \ for (meep::direction d = meep::start_at_direction(dim), \ loop_stop_directi = meep::stop_at_direction(dim); \ d < loop_stop_directi; d = (meep::direction) (d+1)) // loop over all directions in which we might have fields #define LOOP_OVER_FIELD_DIRECTIONS(dim, d) for (meep::direction d = dim == meep::Dcyl ? meep::Z : meep::X; d < (dim == meep::Dcyl ? meep::NO_DIRECTION : meep::R); d = meep::direction(d+1)) // loop over indices idx from is to ie (inclusive) in gv #define LOOP_OVER_IVECS(gv, is, ie, idx) \ for (int loop_is1 = (is).yucky_val(0), \ loop_is2 = (is).yucky_val(1), \ loop_is3 = (is).yucky_val(2), \ loop_n1 = ((ie).yucky_val(0) - loop_is1) / 2 + 1, \ loop_n2 = ((ie).yucky_val(1) - loop_is2) / 2 + 1, \ loop_n3 = ((ie).yucky_val(2) - loop_is3) / 2 + 1, \ loop_d1 = (gv).yucky_direction(0), \ loop_d2 = (gv).yucky_direction(1), \ loop_d3 = (gv).yucky_direction(2), \ loop_s1 = (gv).stride((meep::direction) loop_d1), \ loop_s2 = (gv).stride((meep::direction) loop_d2), \ loop_s3 = (gv).stride((meep::direction) loop_d3), \ idx0 = (is - (gv).little_corner()).yucky_val(0) / 2 * loop_s1 \ + (is - (gv).little_corner()).yucky_val(1) / 2 * loop_s2 \ + (is - (gv).little_corner()).yucky_val(2) / 2 * loop_s3,\ loop_i1 = 0; loop_i1 < loop_n1; loop_i1++) \ for (int loop_i2 = 0; loop_i2 < loop_n2; loop_i2++) \ for (int idx = idx0 + loop_i1*loop_s1 + loop_i2*loop_s2, \ loop_i3 = 0; loop_i3 < loop_n3; loop_i3++, idx+=loop_s3) #define LOOP_OVER_VOL(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_corner() + (gv).iyee_shift(c), (gv).big_corner() + (gv).iyee_shift(c), idx) #define LOOP_OVER_VOL_OWNED(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_owned_corner(c), (gv).big_corner(), idx) #define LOOP_OVER_VOL_OWNED0(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_owned_corner0(c), (gv).big_corner(), idx) #define LOOP_OVER_VOL_NOTOWNED(gv, c, idx) \ for (ivec loop_notowned_is((gv).dim,0), loop_notowned_ie((gv).dim,0); \ loop_notowned_is == zero_ivec((gv).dim);) \ for (int loop_ibound = 0; (gv).get_boundary_icorners(c, loop_ibound, \ &loop_notowned_is, \ &loop_notowned_ie); \ loop_ibound++) \ LOOP_OVER_IVECS(gv, loop_notowned_is, loop_notowned_ie, idx) #define LOOPS_ARE_STRIDE1(gv) ((gv).stride((gv).yucky_direction(2)) == 1) // The following work identically to the LOOP_* macros above, // but assume that the inner loop is stride-1: LOOPS_ARE_STRIDE1(gv) *must* // be true. These are useful in allowing gcc to auto-vectorize the inner // loop, since gcc's vectorizer requires the array stride to be known at // compile time. Note that stride-1 loops are the most common case in Meep. // Note that we also specify _Pragma("ivdep"), which is a hint to // compilers like icc (and hopefully gcc at some point) that the loop // iterations don't have data dependencies. This means that you // should only use these macros where that is true! (Basically, // all of this is here to support performance hacks of step_generic.) // loop over indices idx from is to ie (inclusive) in gv #define S1LOOP_OVER_IVECS(gv, is, ie, idx) \ for (int loop_is1 = (is).yucky_val(0), \ loop_is2 = (is).yucky_val(1), \ loop_is3 = (is).yucky_val(2), \ loop_n1 = ((ie).yucky_val(0) - loop_is1) / 2 + 1, \ loop_n2 = ((ie).yucky_val(1) - loop_is2) / 2 + 1, \ loop_n3 = ((ie).yucky_val(2) - loop_is3) / 2 + 1, \ loop_d1 = (gv).yucky_direction(0), \ loop_d2 = (gv).yucky_direction(1), \ loop_s1 = (gv).stride((meep::direction) loop_d1), \ loop_s2 = (gv).stride((meep::direction) loop_d2), \ loop_s3 = 1, \ idx0 = (is - (gv).little_corner()).yucky_val(0) / 2 * loop_s1 \ + (is - (gv).little_corner()).yucky_val(1) / 2 * loop_s2 \ + (is - (gv).little_corner()).yucky_val(2) / 2 * loop_s3,\ loop_i1 = 0; loop_i1 < loop_n1; loop_i1++) \ for (int loop_i2 = 0; loop_i2 < loop_n2; loop_i2++) _Pragma("ivdep") \ for (int idx = idx0 + loop_i1*loop_s1 + loop_i2*loop_s2, \ loop_i3 = 0; loop_i3 < loop_n3; loop_i3++, idx++) #define S1LOOP_OVER_VOL(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_corner() + (gv).iyee_shift(c), (gv).big_corner() + (gv).iyee_shift(c), idx) #define S1LOOP_OVER_VOL_OWNED(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_owned_corner(c), (gv).big_corner(), idx) #define S1LOOP_OVER_VOL_OWNED0(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_owned_corner0(c), (gv).big_corner(), idx) #define S1LOOP_OVER_VOL_NOTOWNED(gv, c, idx) \ for (ivec loop_notowned_is((gv).dim,0), loop_notowned_ie((gv).dim,0); \ loop_notowned_is == meep::zero_ivec((gv).dim);) \ for (int loop_ibound = 0; (gv).get_boundary_icorners(c, loop_ibound, \ &loop_notowned_is, \ &loop_notowned_ie); \ loop_ibound++) \ S1LOOP_OVER_IVECS(gv, loop_notowned_is, loop_notowned_ie, idx) #define IVEC_LOOP_AT_BOUNDARY \ ((loop_s1 != 0 && (loop_i1 == 0 || loop_i1 == loop_n1-1)) || \ (loop_s2 != 0 && (loop_i2 == 0 || loop_i2 == loop_n2-1)) || \ (loop_s3 != 0 && (loop_i3 == 0 || loop_i3 == loop_n3-1))) #define IVEC_LOOP_ILOC(gv, iloc) \ ivec iloc((gv).dim); \ iloc.set_direction(direction(loop_d1), loop_is1 + 2*loop_i1); \ iloc.set_direction(direction(loop_d2), loop_is2 + 2*loop_i2); \ iloc.set_direction(direction(loop_d3), loop_is3 + 2*loop_i3) #define IVEC_LOOP_LOC(gv, loc) \ vec loc((gv).dim); \ loc.set_direction(direction(loop_d1), (0.5*loop_is1 + loop_i1) * (gv).inva); \ loc.set_direction(direction(loop_d2), (0.5*loop_is2 + loop_i2) * (gv).inva); \ loc.set_direction(direction(loop_d3), (0.5*loop_is3 + loop_i3) * (gv).inva) // integration weight for using LOOP_OVER_IVECS with field::integrate #define IVEC_LOOP_WEIGHT1x(s0, s1, e0, e1, i, n, dir) ((i > 1 && i < n - 2) ? 1.0 : (i == 0 ? (s0).in_direction(meep::direction(dir)) : (i == 1 ? (s1).in_direction(meep::direction(dir)) : i == n - 1 ? (e0).in_direction(meep::direction(dir)) : (i == n - 2 ? (e1).in_direction(meep::direction(dir)) : 1.0)))) #define IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, k) IVEC_LOOP_WEIGHT1x(s0, s1, e0, e1, loop_i##k,loop_n##k,loop_d##k) #define IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV) (IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 3) * (IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 2) * ((dV) * IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 1)))) inline signed_direction flip(signed_direction d) { signed_direction d2 = d; d2.flipped = !d.flipped; return d2; } inline bool has_direction(ndim dim, direction d) { LOOP_OVER_DIRECTIONS(dim, dd) if (dd == d) return true; return false; } inline bool has_field_direction(ndim dim, direction d) { LOOP_OVER_FIELD_DIRECTIONS(dim, dd) if (dd == d) return true; return false; } // true if d is polar while dim is cartesian, or vice versa inline bool coordinate_mismatch(ndim dim, direction d) { return (d != NO_DIRECTION && ((dim >= D1 && dim <= D3 && d != X && d != Y && d != Z) || (dim == Dcyl && d != R && d != P && d != Z))); } bool is_tm(component c); extern void abort(const char *, ...); // mympi.cpp inline bool is_electric(component c) { return c < Hx; } inline bool is_magnetic(component c) { return c >= Hx && c < Dx; } inline bool is_D(component c) { return c >= Dx && c < Bx; } inline bool is_B(component c) { return c >= Bx && c < Dielectric; } inline bool is_derived(int c) { return c >= Sx; } inline bool is_poynting(derived_component c) { return c < EnergyDensity; } inline bool is_energydensity(derived_component c) { return c>=EnergyDensity; } inline field_type type(component c) { if (is_electric(c)) return E_stuff; else if (is_magnetic(c)) return H_stuff; else if (is_D(c)) return D_stuff; else if (is_B(c)) return B_stuff; abort("Invalid field in type.\n"); return E_stuff; // This is never reached. } const char *component_name(component c); const char *component_name(derived_component c); const char *component_name(int c); const char *direction_name(direction); const char *dimension_name(ndim); inline int component_index(component c) { switch (c) { case Ex: case Hx: case Dx: case Bx: return 0; case Ey: case Hy: case Dy: case By: return 1; case Ez: case Hz: case Dz: case Bz: return 2; case Er: case Hr: case Dr: case Br: return 0; case Ep: case Hp: case Dp: case Bp: return 1; case Dielectric: return -1; case Permeability: return -1; } return -2; // This code is never reached... } direction component_direction(int c); int direction_component(int c, direction d); inline direction component_direction(component c) { switch (c) { case Ex: case Hx: case Dx: case Bx: return X; case Ey: case Hy: case Dy: case By: return Y; case Ez: case Hz: case Dz: case Bz: return Z; case Er: case Hr: case Dr: case Br: return R; case Ep: case Hp: case Dp: case Bp: return P; case Dielectric: return NO_DIRECTION; case Permeability: return NO_DIRECTION; } return X; // This code is never reached... } inline direction component_direction(derived_component c) { switch (c) { case Sx: return X; case Sy: return Y; case Sz: return Z; case Sr: return R; case Sp: return P; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: return NO_DIRECTION; } return X; // This code is never reached... } inline direction component_direction(int c) { if (is_derived(c)) return component_direction(derived_component(c)); else return component_direction(component(c)); } inline component direction_component(component c, direction d) { component start_point; if (is_electric(c)) start_point = Ex; else if (is_magnetic(c)) start_point = Hx; else if (is_D(c)) start_point = Dx; else if (is_B(c)) start_point = Bx; else if (c == Dielectric && d == NO_DIRECTION) return Dielectric; else if (c == Permeability && d == NO_DIRECTION) return Permeability; else abort("unknown field component %d", c); switch (d) { case X: return start_point; case Y: return (component) (start_point + 1); case Z: return (component) (start_point + 4); case R: return (component) (start_point + 2); case P: return (component) (start_point + 3); case NO_DIRECTION: abort("vector %d component in NO_DIRECTION", c); } return Ex; // This is never reached. } inline derived_component direction_component(derived_component c, direction d) { derived_component start_point; if (is_poynting(c)) start_point = Sx; else if (is_energydensity(c) && d == NO_DIRECTION) return c; else abort("unknown field component %d", c); switch (d) { case X: return start_point; case Y: return (derived_component) (start_point + 1); case Z: return (derived_component) (start_point + 4); case R: return (derived_component) (start_point + 2); case P: return (derived_component) (start_point + 3); case NO_DIRECTION: abort("vector %d derived_component in NO_DIRECTION", c); } return Sx; // This is never reached. } inline int direction_component(int c, direction d) { if (is_derived(c)) return int(direction_component(derived_component(c), d)); else return int(direction_component(component(c), d)); } inline component field_type_component(field_type ft, component c) { return direction_component(first_field_component(ft), component_direction(c)); } inline bool coordinate_mismatch(ndim dim, component c) { return coordinate_mismatch(dim, component_direction(c)); } inline bool coordinate_mismatch(ndim dim, derived_component c) { return coordinate_mismatch(dim, component_direction(c)); } // cyclically shift a direction d or a component c by shift // assumes: shift >= -99, {d, component_direction(c)} != NO_DIRECTION, // and has_direction(dim, {d, component_direction(c)}) inline direction cycle_direction(ndim dim, direction d, int shift) { int start = dim == Dcyl ? 2 : 0; return direction((d - start + shift + 99) % 3 + start); } inline component cycle_component(ndim dim, component c, int shift) { return direction_component(c, cycle_direction(dim, component_direction(c), shift)); } class vec; vec veccyl(double rr, double zz); vec zero_vec(ndim); class vec { public: vec() {}; vec(ndim di) { dim = di; }; vec(ndim di, double val) { dim = di; t[0]=t[1]=t[2]=t[3]=t[4]=val; }; vec(double zz) { dim = D1; t[Z] = zz; }; vec(double xx, double yy) { dim = D2; t[X] = xx; t[Y] = yy; }; vec(double xx, double yy, double zz) { dim = D3; t[X] = xx; t[Y] = yy; t[Z] = zz; }; friend vec veccyl(double rr, double zz); ~vec() {}; vec operator+(const vec &a) const { vec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] += t[d]; return result; }; vec operator+=(const vec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] += a.t[d]; return *this; }; vec operator-(const vec &a) const { vec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] - result.t[d]; return result; }; vec operator-(void) const { vec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = -t[d]; return result; }; vec operator-=(const vec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] -= a.t[d]; return *this; }; bool operator!=(const vec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return true; return false; }; bool operator==(const vec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return false; return true; }; vec round_float(void) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = float(result.t[d]); return result; } vec operator*(double s) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= s; return result; }; vec operator/(double s) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= (1.0/s); return result; }; // I use & as a dot product. double operator&(const vec &a) const { double result = 0.0; LOOP_OVER_DIRECTIONS(dim, d) result += t[d] * a.t[d]; return result; }; ndim dim; double r() const { return t[R]; }; double x() const { return t[X]; }; double y() const { return t[Y]; }; double z() const { return t[Z]; }; double in_direction(direction d) const { return t[d]; }; void set_direction(direction d, double val) { t[d] = val; }; double project_to_boundary(direction, double boundary_loc); friend vec zero_vec(ndim); friend vec one_vec(ndim); private: double t[5]; }; inline double abs(const vec &pt) { return sqrt(pt & pt); } inline vec zero_vec(ndim di) { vec pt(di); LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 0.0); return pt; } inline vec one_vec(ndim di) { vec pt(di); LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 1.0); return pt; } inline vec unit_vec(ndim di, direction d) { vec pt(zero_vec(di)); pt.set_direction(d, 1.0); return pt; } inline vec clean_vec(const vec &pt, double val_unused = 0.0) { vec ptc(pt.dim, val_unused); LOOP_OVER_DIRECTIONS(pt.dim, d) ptc.set_direction(d, pt.in_direction(d)); return ptc; } inline vec veccyl(double rr, double zz) { vec pt(Dcyl); pt.t[R] = rr; pt.t[Z] = zz; return pt; } class ivec; ivec iveccyl(int xx, int yy); ivec zero_ivec(ndim); ivec one_ivec(ndim); class ivec { public: ivec() { dim = D2; t[X] = t[Y] = 0; }; ivec(ndim di) { dim = di; }; ivec(ndim di, int val) { dim = di; t[0]=t[1]=t[2]=t[3]=t[4]=val; }; ivec(int zz) { dim = D1; t[Z] = zz; }; ivec(int xx, int yy) { dim = D2; t[X] = xx; t[Y] = yy; }; ivec(int xx, int yy, int zz) { dim = D3; t[X] = xx; t[Y] = yy; t[Z] = zz; }; friend ivec iveccyl(int xx, int yy); ~ivec() {}; // Only an idiot (or a macro) would use a yucky function. Don't be an // idiot. int yucky_val(int) const; ivec operator+(const ivec &a) const { ivec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] += t[d]; return result; }; ivec operator+=(const ivec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] += a.t[d]; return *this; }; ivec operator-(const ivec &a) const { ivec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] - result.t[d]; return result; }; ivec operator-(void) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = -t[d]; return result; }; ivec operator-=(const ivec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] -= a.t[d]; return *this; }; bool operator!=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return true; return false; }; bool operator==(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return false; return true; }; bool operator<=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] > a.t[d]) return false; return true; }; bool operator>=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] < a.t[d]) return false; return true; }; bool operator<(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] >= a.t[d]) return false; return true; }; bool operator>(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] <= a.t[d]) return false; return true; }; ivec operator*(int s) const { ivec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= s; return result; }; vec operator*(double s) const { vec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.set_direction(d, t[d] * s); return result; }; ndim dim; int r() const { return t[R]; }; int x() const { return t[X]; }; int y() const { return t[Y]; }; int z() const { return t[Z]; }; int in_direction(direction d) const { return t[d]; }; void set_direction(direction d, int val) { t[d] = val; }; ivec round_up_to_even(void) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] + (t[d] >= 0 ? t[d] : -t[d]) % 2; return result; } friend ivec zero_ivec(ndim); friend ivec one_ivec(ndim); private: int t[5]; }; inline ivec zero_ivec(ndim di) { ivec pt; pt.dim = di; LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 0); return pt; } inline ivec one_ivec(ndim di) { ivec pt; pt.dim = di; LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 1); return pt; } inline ivec unit_ivec(ndim di, direction d) { ivec pt(zero_ivec(di)); pt.set_direction(d, 1); return pt; } inline ivec iveccyl(int rr, int zz) { ivec pt(Dcyl); pt.t[R] = rr; pt.t[Z] = zz; return pt; } vec max(const vec &vec1, const vec &vec2); vec min(const vec &vec1, const vec &vec2); ivec max(const ivec &ivec1, const ivec &ivec2); ivec min(const ivec &ivec1, const ivec &ivec2); ivec max_to_all(const ivec &); // in mympi.cpp class volume { public: ndim dim; volume(ndim di) { dim = di; min_corner.dim = di; max_corner.dim = di; }; volume(const vec &vec1, const vec &vec2); volume(const vec &pt); void set_direction_min(direction d, double val) { min_corner.set_direction(d, val); }; void set_direction_max(direction d, double val) { max_corner.set_direction(d, val); }; double in_direction_min(direction d) const { return min_corner.in_direction(d); }; double in_direction_max(direction d) const { return max_corner.in_direction(d); }; double in_direction(direction d) const { return in_direction_max(d) - in_direction_min(d); } double computational_volume() const; double integral_volume() const; double full_volume() const; vec center() const { return (min_corner + max_corner) * 0.5; } double diameter() const; bool contains(const vec &h) const; bool contains(const volume &a) const; volume intersect_with(const volume &a) const; volume operator&(const volume &a) const { return intersect_with(a); }; volume operator|(const volume &a) const { return volume(min(min_corner, a.min_corner), max(max_corner, a.max_corner)); }; volume operator+(const vec &a) const { return volume(min_corner + a, max_corner + a); } volume operator+=(const vec &a) { min_corner += a; max_corner += a; return *this; } volume operator-(const vec &a) const { return volume(min_corner - a, max_corner - a); } volume operator-=(const vec &a) { min_corner -= a; max_corner -= a; return *this; } bool operator==(const volume &a) const { return (min_corner == a.min_corner && max_corner == a.max_corner); } bool operator!=(const volume &a) const { return !(*this == a); }; volume round_float(void) const { return volume(min_corner.round_float(),max_corner.round_float()); } bool intersects(const volume &a) const; bool operator&&(const volume &a) const { return intersects(a); }; vec get_min_corner() const { return min_corner; }; vec get_max_corner() const { return max_corner; }; direction normal_direction() const; private: vec min_corner, max_corner; }; class grid_volume; grid_volume volcyl(double rsize, double zsize, double a); grid_volume volone(double zsize, double a); grid_volume vol1d(double zsize, double a); grid_volume voltwo(double xsize, double ysize, double a); grid_volume vol2d(double xsize, double ysize, double a); grid_volume vol3d(double xsize, double ysize, double zsize, double a); class grid_volume { public: grid_volume() {}; ndim dim; double a, inva /* = 1/a */; void print() const; int stride(direction d) const { return the_stride[d]; }; int num_direction(direction d) const { return num[((int) d) % 3]; }; // Only an idiot (or a macro) would use a yucky function. Don't be an // idiot. int yucky_num(int) const; direction yucky_direction(int) const; void set_num_direction(direction d, int value); int nr() const { return num_direction(R); } int nx() const { return num_direction(X); } int ny() const { return num_direction(Y); } int nz() const { return num_direction(Z); } bool has_field(component c) const { if (dim == D1) return c == Ex || c == Hy || c == Dx || c == By; return (dim == Dcyl)?component_direction(c)>Y:component_direction(c) phase_shift(component, int n) const; derived_component transform(derived_component, int n) const; std::complex phase_shift(derived_component, int n) const; int transform(int, int n) const; std::complex phase_shift(int, int n) const; int multiplicity() const; bool is_primitive(const ivec &) const; volume_list *reduce(const volume_list *gl) const; symmetry operator+(const symmetry &) const; symmetry operator*(std::complex) const; symmetry operator-(const symmetry &b) const { return *this + b * (-1.0); } symmetry operator-(void) const { return *this * (-1.0); } void operator=(const symmetry &); bool operator==(const symmetry &) const; bool operator!=(const symmetry &S) const { return !(*this == S); }; private: signed_direction S[5]; std::complex ph; vec symmetry_point; ivec i_symmetry_point; int g; // g is the multiplicity of the symmetry. symmetry *next; friend symmetry r_to_minus_r_symmetry(double m); }; class volume_list { public: volume_list(const volume &v, int c, std::complex weight = 1.0, volume_list *next = 0) : v(v), c(c), weight(weight), next(next) {} ~volume_list() { delete next; } volume_list(const volume_list *vl) : v(vl->v), c(vl->c), weight(vl->weight), next(0) { volume_list *p = vl->next, *q = this; while (p) { q->next = new volume_list(*p); q = q->next; p = p->next; } } volume v; int c; // component or derived component associated with v (e.g. for flux) std::complex weight; volume_list *next; }; } /* namespace meep */ #endif /* MEEP_VEC_H */ meep-1.3/src/meep/mympi.hpp0000644000175400001440000000674312506540456012626 00000000000000// -*- C++ -*- /* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEEP_MY_MPI_H #define MEEP_MY_MPI_H #include namespace meep { // MPI helper routines! double wall_time(void); class initialize { public: initialize(int &argc, char** &argv); ~initialize(); double elapsed_time() { return wall_time() - t_start; } private: double t_start; }; #ifdef __GNUC__ # define NORETURN_ATTR __attribute__((noreturn)) # define PRINTF_ATTR(f,a) __attribute__((format(printf, f, a))) #else # define NORETURN_ATTR # define PRINTF_ATTR(f,a) #endif void abort(const char *fmt, ...) NORETURN_ATTR PRINTF_ATTR(1,2); void all_wait(); int count_processors(); int my_rank(); bool am_really_master(); inline int am_master() { return my_rank() == 0; } void send(int from, int to, double *data, int size=1); void broadcast(int from, double *data, int size); void broadcast(int from, char *data, int size); void broadcast(int from, int *data, int size); void broadcast(int from, std::complex *data, int size); std::complex broadcast(int from, std::complex data); double broadcast(int from, double data); int broadcast(int from, int data); bool broadcast(int from, bool); double max_to_master(double); // Only returns the correct value to proc 0. double max_to_all(double); int max_to_all(int); double sum_to_master(double); // Only returns the correct value to proc 0. double sum_to_all(double); void sum_to_all(const double *in, double *out, int size); void sum_to_master(const double *in, double *out, int size); void sum_to_all(const float *in, double *out, int size); void sum_to_all(const std::complex *in, std::complex *out, int size); void sum_to_all(const std::complex *in, std::complex *out, int size); void sum_to_master(const std::complex *in, std::complex *out, int size); long double sum_to_all(long double); std::complex sum_to_all(std::complex in); std::complex sum_to_all(std::complex in); int sum_to_all(int); int partial_sum_to_all(int in); bool or_to_all(bool in); void or_to_all(const int *in, int *out, int size); bool and_to_all(bool in); void and_to_all(const int *in, int *out, int size); // IO routines: void master_printf(const char *fmt, ...) PRINTF_ATTR(1,2); void debug_printf(const char *fmt, ...) PRINTF_ATTR(1,2); void master_fprintf(FILE *f, const char *fmt, ...) PRINTF_ATTR(2,3); FILE *master_fopen(const char *name, const char *mode); void master_fclose(FILE *f); void begin_critical_section(int tag); void end_critical_section(int tag); int divide_parallel_processes(int numgroups); void begin_global_communications(void); void end_global_communications(void); void end_divide_parallel(void); int my_global_rank(void); } /* namespace meep */ #endif /* MEEP_MY_MPI_H */ meep-1.3/src/sphere-quad.h0000644000175400001440000001427112315342577012420 00000000000000/* This file was automatically generated --- DO NOT EDIT */ /* For 1d, 2d, and 3d, quadrature points and weights on a unit sphere. There are num_sphere_quad[dim-1] points i, with the i-th point at (x,y,z) = (sphere_quad[dim-1][i][ 0, 1, 2 ]), and with a quadrature weight sphere_quad[dim-1][i][3]. */ static const int num_sphere_quad[3] = { 2, 12, 50 }; static const double sphere_quad[3][50][4] = { { {0,0,1,0.5}, {0,0,-1,0.5} }, { { 1, 0, 0, 0.083333333333333328707 }, { -1, 1.2246467991473532072e-16, 0, 0.083333333333333328707 }, { 6.1232339957367660359e-17, 1, 0, 0.083333333333333328707 }, { -1.8369701987210296875e-16, -1, 0, 0.083333333333333328707 }, { -0.49999999999999977796, 0.86602540378443870761, 0, 0.083333333333333328707 }, { 0.50000000000000011102, -0.86602540378443859659, 0, 0.083333333333333328707 }, { -0.86602540378443870761, 0.49999999999999994449, 0, 0.083333333333333328707 }, { 0.86602540378443837454, -0.50000000000000044409, 0, 0.083333333333333328707 }, { -0.50000000000000044409, -0.86602540378443837454, 0, 0.083333333333333328707 }, { 0.50000000000000011102, 0.86602540378443859659, 0, 0.083333333333333328707 }, { 0.86602540378443870761, 0.49999999999999994449, 0, 0.083333333333333328707 }, { -0.86602540378443881863, -0.49999999999999972244, 0, 0.083333333333333328707 }, }, { { 0, -1, 0, 0.012698412698412698402 }, { 0, 1, 0, 0.012698412698412698402 }, { -1, 0, 0, 0.012698412698412698402 }, { 1, 0, 0, 0.012698412698412698402 }, { 0, 0, 1, 0.012698412698412698402 }, { 0, 0, -1, 0.012698412698412698402 }, { -0.57735026918962573106, -0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, 0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, -0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, 0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, 0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, -0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, 0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, -0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.70710678118654757274, -0.70710678118654757274, 0, 0.022574955908289243145 }, { -0.70710678118654757274, 0.70710678118654757274, 0, 0.022574955908289243145 }, { 0.70710678118654757274, 0, 0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, 0, -0.70710678118654757274, 0.022574955908289243145 }, { 0, -0.70710678118654757274, -0.70710678118654757274, 0.022574955908289243145 }, { 0, 0.70710678118654757274, 0.70710678118654757274, 0.022574955908289243145 }, { 0.70710678118654757274, 0, -0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, 0, 0.70710678118654757274, 0.022574955908289243145 }, { 0, 0.70710678118654757274, -0.70710678118654757274, 0.022574955908289243145 }, { 0, -0.70710678118654757274, 0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, -0.70710678118654757274, 0, 0.022574955908289243145 }, { 0.70710678118654757274, 0.70710678118654757274, 0, 0.022574955908289243145 }, { -0.90453403373329088755, -0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, 0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, -0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, -0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, 0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, -0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, -0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { 0.90453403373329088755, 0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, -0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, -0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, 0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, -0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, 0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, -0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, 0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, 0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, -0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, 0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, -0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, 0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, -0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, } }; meep-1.3/src/h5fields.cpp0000644000175400001440000003622112506540456012235 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* HDF5 output of fields and arbitrary functions thereof. Works very similarly to integrate.cpp (using fields::loop_in_chunks). */ #include #include #include #include "meep_internals.hpp" using namespace std; namespace meep { /***************************************************************************/ typedef struct { // information related to the HDF5 dataset (its size, etcetera) h5file *file; ivec min_corner, max_corner; int num_chunks; realnum *buf; int bufsz; int rank; direction ds[3]; int reim; // whether to output the real or imaginary part // the function to output and related info (offsets for averaging, etc.) int num_fields; const component *components; component *cS; complex *ph; complex *fields; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; field_function fun; void *fun_data_; } h5_output_data; #define UNUSED(x) (void) x // silence compiler warnings static void h5_findsize_chunkloop(fields_chunk *fc, int ichnk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { UNUSED(ichnk);UNUSED(cgrid);UNUSED(s0);UNUSED(s1);UNUSED(e0);UNUSED(e1); UNUSED(dV0);UNUSED(dV1);UNUSED(shift_phase); h5_output_data *data = (h5_output_data *) data_; ivec isS = S.transform(is, sn) + shift; ivec ieS = S.transform(ie, sn) + shift; data->min_corner = min(data->min_corner, min(isS, ieS)); data->max_corner = max(data->max_corner, max(isS, ieS)); data->num_chunks++; int bufsz = 1; LOOP_OVER_DIRECTIONS(fc->gv.dim, d) bufsz *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; data->bufsz = max(data->bufsz, bufsz); } static void h5_output_chunkloop(fields_chunk *fc, int ichnk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { UNUSED(ichnk);UNUSED(cgrid);UNUSED(s0);UNUSED(s1);UNUSED(e0);UNUSED(e1); UNUSED(dV0);UNUSED(dV1); h5_output_data *data = (h5_output_data *) data_; //-----------------------------------------------------------------------// // Find output chunk dimensions and strides, etc. int start[3]={0,0,0}, count[3]={1,1,1}; int offset[3]={0,0,0}, stride[3]={1,1,1}; ivec isS = S.transform(is, sn) + shift; ivec ieS = S.transform(ie, sn) + shift; // figure out what yucky_directions (in LOOP_OVER_IVECS) // correspond to what directions in the transformed vectors (in output). ivec permute(zero_ivec(fc->gv.dim)); for (int i = 0; i < 3; ++i) permute.set_direction(fc->gv.yucky_direction(i), i); permute = S.transform_unshifted(permute, sn); LOOP_OVER_DIRECTIONS(permute.dim, d) permute.set_direction(d, abs(permute.in_direction(d))); // compute the size of the chunk to output, and its strides etc. for (int i = 0; i < data->rank; ++i) { direction d = data->ds[i]; int isd = isS.in_direction(d), ied = ieS.in_direction(d); start[i] = (min(isd, ied) - data->min_corner.in_direction(d)) / 2; count[i] = abs(ied - isd) / 2 + 1; if (ied < isd) offset[permute.in_direction(d)] = count[i] - 1; } for (int i = 0; i < data->rank; ++i) { direction d = data->ds[i]; int j = permute.in_direction(d); for (int k = i + 1; k < data->rank; ++k) stride[j] *= count[k]; offset[j] *= stride[j]; if (offset[j]) stride[j] *= -1; } //-----------------------------------------------------------------------// // Compute the function to output, exactly as in fields::integrate, // except that here we store its values in a buffer instead of integrating. int *off = data->offsets; component *cS = data->cS; complex *fields = data->fields, *ph = data->ph; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int imos[6]; for (int i = 0; i < data->num_fields; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fields; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fields[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fields[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fields[i] = complex(f[0], f[1]) * ph[i]; } } complex fun = data->fun(fields, loc, data->fun_data_); int idx2 = ((((offset[0] + offset[1] + offset[2]) + loop_i1 * stride[0]) + loop_i2 * stride[1]) + loop_i3 * stride[2]); data->buf[idx2] = data->reim ? imag(fun) : real(fun); } //-----------------------------------------------------------------------// data->file->write_chunk(data->rank, start, count, data->buf); } void fields::output_hdf5(h5file *file, const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, int reim, const volume &where, bool append_data, bool single_precision) { am_now_working_on(FieldOutput); h5_output_data data; data.file = file; data.min_corner = gv.round_vec(where.get_max_corner()) + one_ivec(gv.dim); data.max_corner = gv.round_vec(where.get_min_corner()) - one_ivec(gv.dim); data.num_chunks = 0; data.bufsz = 0; data.reim = reim; loop_in_chunks(h5_findsize_chunkloop, (void *) &data, where, Centered, true, true); file->prevent_deadlock(); // can't hold a lock since *_to_all is collective data.max_corner = max_to_all(data.max_corner); data.min_corner = -max_to_all(-data.min_corner); // i.e., min_to_all data.num_chunks = sum_to_all(data.num_chunks); if (data.num_chunks == 0 || !(data.min_corner <= data.max_corner)) return; // no data to write; int rank = 0, dims[3]; LOOP_OVER_DIRECTIONS(gv.dim, d) { if (rank >= 3) abort("too many dimensions in output_hdf5"); int n = (data.max_corner.in_direction(d) - data.min_corner.in_direction(d)) / 2 + 1; if (n > 1) { data.ds[rank] = d; dims[rank++] = n; } } data.rank = rank; file->create_or_extend_data(dataname, rank, dims, append_data, single_precision); data.buf = new realnum[data.bufsz]; data.num_fields = num_fields; data.components = components; data.cS = new component[num_fields]; data.ph = new complex[num_fields]; data.fields = new complex[num_fields]; data.fun = fun; data.fun_data_ = fun_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fields; ++i) if (components[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fields; ++i) if (components[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * num_fields]; for (int i = 0; i < 2 * num_fields; ++i) data.offsets[i] = 0; loop_in_chunks(h5_output_chunkloop, (void *) &data, where, Centered, true, true); delete[] data.offsets; delete[] data.fields; delete[] data.ph; delete[] data.cS; delete[] data.buf; file->done_writing_chunks(); finished_working(); } /***************************************************************************/ void fields::output_hdf5(const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix, bool real_part_only) { bool delete_file; if ((delete_file = !file)) file = open_h5file(dataname, h5file::WRITE, prefix, true); if (real_part_only) { output_hdf5(file, dataname, num_fields, components, fun, fun_data_, 0, where, append_data, single_precision); } else { int len = strlen(dataname) + 5; char *dataname2 = new char[len]; snprintf(dataname2, len, "%s%s", dataname, ".r"); output_hdf5(file, dataname2, num_fields, components, fun, fun_data_, 0, where, append_data, single_precision); snprintf(dataname2, len, "%s%s", dataname, ".i"); output_hdf5(file, dataname2, num_fields, components, fun, fun_data_, 1, where, append_data, single_precision); delete[] dataname2; } if (delete_file) delete file; } /***************************************************************************/ typedef struct { field_rfunction fun; void *fun_data_; } rintegrand_data; static complex rintegrand_fun(const complex *fields, const vec &loc, void *data_) { rintegrand_data *data = (rintegrand_data *) data_; return data->fun(fields, loc, data->fun_data_); } void fields::output_hdf5(const char *dataname, int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { bool delete_file; if ((delete_file = !file)) file = open_h5file(dataname, h5file::WRITE, prefix, true); rintegrand_data data; data.fun = fun; data.fun_data_ = fun_data_; output_hdf5(file, dataname, num_fields, components, rintegrand_fun, (void *) &data, 0, where, append_data, single_precision); if (delete_file) delete file; } /***************************************************************************/ static complex component_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused (void) data_; // unused return fields[0]; } void fields::output_hdf5(component c, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { if (is_derived(int(c))) { output_hdf5(derived_component(c), where, file, append_data, single_precision, prefix); return; } if (coordinate_mismatch(gv.dim, c)) return; char dataname[256]; bool has_imag = !is_real && c != Dielectric && c != Permeability; bool delete_file; if ((delete_file = !file)) file = open_h5file(component_name(c), h5file::WRITE, prefix, true); snprintf(dataname, 256, "%s%s", component_name(c), has_imag ? ".r" : ""); output_hdf5(file, dataname, 1, &c, component_fun, 0, 0, where, append_data, single_precision); if (has_imag) { snprintf(dataname, 256, "%s.i", component_name(c)); output_hdf5(file, dataname, 1, &c, component_fun, 0, 1, where, append_data, single_precision); } if (delete_file) delete file; } /***************************************************************************/ void fields::output_hdf5(derived_component c, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { if (!is_derived(int(c))) { output_hdf5(component(c), where, file, append_data, single_precision, prefix); return; } if (coordinate_mismatch(gv.dim, c)) return; int nfields; component cs[12]; field_rfunction fun = derived_component_func(c, gv, nfields, cs); output_hdf5(component_name(c), nfields, cs, fun, &nfields, where, file, append_data, single_precision, prefix); } /***************************************************************************/ const char *fields::h5file_name(const char *name, const char *prefix, bool timestamp) { const int buflen = 1024; static char filename[buflen]; char time_step_string[32] = ""; if (timestamp) { if (dt >= 0.01 && dt < 10) snprintf(time_step_string, 32, "-%09.2f", time()); else snprintf(time_step_string, 32, "-%09d", t); } snprintf(filename, buflen, "%s/" "%s%s" "%s" "%s" ".h5", outdir, prefix ? prefix : "", prefix && prefix[0] ? "-" : "", name, time_step_string); return filename; } h5file *fields::open_h5file(const char *name, h5file::access_mode mode, const char *prefix, bool timestamp) { const char *filename = h5file_name(name, prefix, timestamp); if (!quiet && mode == h5file::WRITE) master_printf("creating output file \"%s\"...\n", filename); return new h5file(filename, mode, true); } } // namespace meep meep-1.3/src/integrate2.cpp0000644000175400001440000002360312506540456012576 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "meep_internals.hpp" /* integration routine similar to those in integrate.cpp, but integrating a combination of two fields from two different simulations (assumed to have identical grids etcetera), based on fields::loop_in_chunk */ using namespace std; namespace meep { struct integrate_data { int num_fvals; const component *components; const fields *fields2; int num_fvals2; const component *components2; component *cS; complex *ph; complex *fvals; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; complex sum; double maxabs; field_function integrand; void *integrand_data_; }; static void integrate_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; // unused integrate_data *data = (integrate_data *) data_; int *off = data->offsets; component *cS = data->cS; complex *fvals = data->fvals, *ph = data->ph; complex sum = 0.0; double maxabs = 0; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int num_fvals1 = data->num_fvals; int num_fvals2 = data->num_fvals2; int imos[6]; const fields_chunk *fc2 = data->fields2->chunks[ichunk]; for (int i = 0; i < num_fvals1; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int i = 0; i < num_fvals2; ++i) { int j = i + num_fvals1; cS[j] = S.transform(data->components2[i], -sn); if (cS[j] == Dielectric || cS[j] == Permeability) ph[j] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[j], off[2*j], off[2*j+1]); ph[j] = shift_phase * S.phase_shift(cS[j], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fvals; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } for (int j = 0; j < num_fvals2; ++j) { int i = j + num_fvals1; if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc2->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc2->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc2->f[cS[i]][k]) f[k] = 0.25 * (fc2->f[cS[i]][k][idx] + fc2->f[cS[i]][k][idx+off[2*i]] + fc2->f[cS[i]][k][idx+off[2*i+1]] + fc2->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } complex integrand = data->integrand(fvals, loc, data->integrand_data_); maxabs = max(maxabs, abs(integrand)); sum += integrand * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); } data->maxabs = max(data->maxabs, maxabs); data->sum += sum; } complex fields::integrate2(const fields &fields2, int num_fvals1, const component *components1, int num_fvals2, const component *components2, field_function integrand, void *integrand_data_, const volume &where, double *maxabs) { if (!equal_layout(fields2)) abort("invalid call to integrate2: fields must have equal grid layout"); if (num_fvals2 == 0) return integrate(num_fvals1, components1, integrand, integrand_data_, where, maxabs); if (num_fvals1 == 0) return const_cast(fields2).integrate(num_fvals2, components2, integrand, integrand_data_, where, maxabs); // check if components are all on the same grid: bool same_grid = true; for (int i = 1; i < num_fvals1; ++i) if (gv.iyee_shift(components1[i]) != gv.iyee_shift(components1[0])) { same_grid = false; break; } if (same_grid) for (int i = 0; i < num_fvals2; ++i) if (gv.iyee_shift(components2[i]) != gv.iyee_shift(components1[0])) { same_grid = false; break; } component cgrid = Centered; if (same_grid) cgrid = components1[0]; integrate_data data; data.num_fvals = num_fvals1; data.components = components1; data.fields2 = &fields2; data.num_fvals2 = num_fvals2; data.components2 = components2; data.cS = new component[num_fvals1 + num_fvals2]; data.ph = new complex[num_fvals1 + num_fvals2]; data.fvals = new complex[num_fvals1 + num_fvals2]; data.sum = 0; data.maxabs = 0; data.integrand = integrand; data.integrand_data_ = integrand_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fvals1; ++i) if (components1[i] == Dielectric) { needs_dielectric = true; break; } if (!needs_dielectric) for (int i = 0; i < num_fvals2; ++i) if (components2[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fvals1; ++i) if (components1[i] == Permeability) { needs_permeability = true; break; } if (!needs_permeability) for (int i = 0; i < num_fvals2; ++i) if (components2[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * (num_fvals1 + num_fvals2)]; for (int i = 0; i < 2 * (num_fvals1 + num_fvals2); ++i) data.offsets[i] = 0; loop_in_chunks(integrate_chunkloop, (void *) &data, where, cgrid); delete[] data.offsets; delete[] data.fvals; delete[] data.ph; delete[] data.cS; if (maxabs) *maxabs = max_to_all(data.maxabs); data.sum = sum_to_all(data.sum); return complex(real(data.sum), imag(data.sum)); } typedef struct { field_rfunction integrand; void *integrand_data; } rfun_wrap_data; static complex rfun_wrap(const complex *fields, const vec &loc, void *data_) { rfun_wrap_data *data = (rfun_wrap_data *) data_; return data->integrand(fields, loc, data->integrand_data); } double fields::integrate2(const fields &fields2, int num_fvals1, const component *components1, int num_fvals2, const component *components2, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return real(integrate2(fields2, num_fvals1, components1, num_fvals2, components2, rfun_wrap, &data, where, maxabs)); } } // namespace meep meep-1.3/src/h5file.cpp0000644000175400001440000006037512506540456011715 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #define CHECK(condition, message) do { \ if (!(condition)) { \ abort("error on line %d of " __FILE__ ": " \ message "\n", __LINE__); \ } \ } while (0) #include "config.h" #ifdef HAVE_HDF5 /* don't use new HDF5 1.8 API (which isn't even fully documented yet, grrr) */ # define H5_USE_16_API 1 # include /* HDF5 changed this datatype in their interfaces starting in version 1.6.4 */ # if H5_VERS_MAJOR > 1 \ || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR > 6) \ || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6 && H5_VERS_RELEASE > 3) typedef hsize_t start_t; # else typedef hssize_t start_t; # endif #else typedef int hid_t; #endif #define HID(x) (*((hid_t *) (x))) /*****************************************************************************/ /* If we have the H5Pset_fapl_mpio function (which is available if HDF5 was compiled for MPI), then we can perform collective file i/o operations (e.g. all processes call H5Fcreate at the same time to create one file). If we don't, however, then we deal with it by having one process work with the file at a time: "exclusive" access. The following macro helps us select different bits of code depending upon whether this is the case. */ #ifdef HAVE_H5PSET_MPI /* old name for this routine */ # define H5Pset_fapl_mpio H5Pset_mpi # ifndef HAVE_H5PSET_FAPL_MPIO # define HAVE_H5PSET_FAPL_MPIO 1 # endif #endif #if defined(HAVE_H5PSET_FAPL_MPIO) || !defined(HAVE_MPI) # define IF_EXCLUSIVE(yes,no) no #else # define IF_EXCLUSIVE(yes,no) yes static int h5io_critical_section_tag = 0; #endif /*****************************************************************************/ /* Normally, HDF5 prints out all sorts of error messages, e.g. if a dataset can't be found, in addition to returning an error code. The following macro can be wrapped around code to temporarily suppress error messages. */ #define SUPPRESS_HDF5_ERRORS(statements) { \ H5E_auto_t xxxxx_err_func; \ void *xxxxx_err_func_data; \ H5Eget_auto(&xxxxx_err_func, &xxxxx_err_func_data); \ H5Eset_auto(NULL, NULL); \ { statements; } \ H5Eset_auto(xxxxx_err_func, xxxxx_err_func_data); \ } /*****************************************************************************/ #ifdef HAVE_HDF5 static bool dataset_exists(hid_t id, const char *name) { hid_t data_id; SUPPRESS_HDF5_ERRORS(data_id = H5Dopen(id, name)); if (data_id >= 0) H5Dclose(data_id); return (data_id >= 0); } #endif /*****************************************************************************/ using namespace std; namespace meep { // lazy file creation & locking void *h5file::get_id() { if (HID(id) < 0) { if (parallel) all_wait(); #ifdef HAVE_HDF5 hid_t access_props = H5Pcreate (H5P_FILE_ACCESS); # ifdef HAVE_MPI # ifdef HAVE_H5PSET_FAPL_MPIO if (parallel) H5Pset_fapl_mpio(access_props, MPI_COMM_WORLD, MPI_INFO_NULL); # else if (parallel) begin_critical_section(h5io_critical_section_tag); # endif # endif if (mode != WRITE || IF_EXCLUSIVE(parallel && !am_master(), 0)) HID(id) = H5Fopen(filename, mode == READONLY ? H5F_ACC_RDONLY : H5F_ACC_RDWR, access_props); else HID(id) = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, access_props); H5Pclose(access_props); #endif } return id; } // hackery: in some circumstances, for the exclusive-access mode // we must close the id (i.e. the file) in order to prevent deadlock. void h5file::prevent_deadlock() { IF_EXCLUSIVE(if (parallel) close_id(), (void) 0); } void h5file::close_id() { unset_cur(); if (HID(id) >= 0) if (mode == WRITE) mode = READWRITE; // don't re-create on re-open #ifdef HAVE_HDF5 if (HID(id) >= 0) { H5Fclose(HID(id)); IF_EXCLUSIVE(if (parallel) end_critical_section(h5io_critical_section_tag++), (void) 0); } #endif HID(id) = -1; } /* note: if parallel is true, then *all* processes must call this, and all processes will use I/O. */ h5file::h5file(const char *filename_, access_mode m, bool parallel_) { cur_dataname = NULL; id = (void*) malloc(sizeof(hid_t)); cur_id = (void*) malloc(sizeof(hid_t)); HID(id) = -1; HID(cur_id) = -1; extending = 0; filename = new char[strlen(filename_) + 1]; strcpy(filename, filename_); mode = m; parallel = parallel_; } h5file::~h5file() { close_id(); if (cur_dataname) free(cur_dataname); // allocated with realloc for (h5file::extending_s *cur = extending; cur; ) { h5file::extending_s *next = cur->next; delete[] cur->dataname; delete cur; cur = next; } delete[] filename; free(cur_id); free(id); } bool h5file::ok() { return (HID(get_id()) >= 0); } void h5file::remove() { close_id(); if (mode == READWRITE) mode = WRITE; // now need to re-create file for (h5file::extending_s *cur = extending; cur; ) { h5file::extending_s *next = cur->next; delete[] cur->dataname; delete cur; cur = next; } extending = 0; IF_EXCLUSIVE(if (parallel) all_wait(), (void) 0); if (am_master() && std::remove(filename)) abort("error removing file %s", filename); } h5file::extending_s *h5file::get_extending(const char *dataname) const { for (extending_s *cur = extending; cur; cur = cur->next) if (!strcmp(dataname, cur->dataname)) return cur; return NULL; } bool h5file::is_cur(const char *dataname) { return cur_dataname && !strcmp(cur_dataname, dataname); } void h5file::unset_cur() { #ifdef HAVE_HDF5 if (HID(cur_id) >= 0) H5Dclose(HID(cur_id)); #endif HID(cur_id) = -1; if (cur_dataname) cur_dataname[0] = 0; } void h5file::set_cur(const char *dataname, void *data_id) { #ifdef HAVE_HDF5 if (HID(cur_id) >= 0 && HID(cur_id) != HID(data_id)) H5Dclose(HID(cur_id)); #endif HID(cur_id) = HID(data_id); if (!is_cur(dataname)) { if (!cur_dataname || strlen(dataname) < strlen(cur_dataname)) cur_dataname = (char *) realloc(cur_dataname, strlen(dataname) + 1); strcpy(cur_dataname, dataname); } } void h5file::read_size(const char *dataname, int *rank, int *dims, int maxrank) { #ifdef HAVE_HDF5 if (parallel || am_master()) { hid_t file_id = HID(get_id()), space_id, data_id; CHECK(file_id >= 0, "error opening HDF5 input file"); if (is_cur(dataname)) data_id = HID(cur_id); else { CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); set_cur(dataname, &data_id); } space_id = H5Dget_space(data_id); *rank = H5Sget_simple_extent_ndims(space_id); CHECK(*rank <= maxrank, "input array rank is too big"); hsize_t *dims_copy = new hsize_t[*rank]; hsize_t *maxdims = new hsize_t[*rank]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); for (int i = 0; i < *rank; ++i) dims[i] = dims_copy[i]; delete[] maxdims; delete[] dims_copy; H5Sclose(space_id); } if (!parallel) { *rank = broadcast(0, *rank); broadcast(0, dims, *rank); if (*rank == 1 && dims[0] == 1) *rank = 0; } #endif } #ifdef HAVE_HDF5 /* check if the given name is a dataset in group_id, and if so set d to point to a char** with a copy of name. */ static herr_t find_dataset(hid_t group_id, const char *name, void *d) { char **dname = (char **) d; H5G_stat_t info; H5Gget_objinfo(group_id, name, 1, &info); if (info.type == H5G_DATASET) { *dname = new char[strlen(name) + 1]; strcpy(*dname, name); return 1; } return 0; } #endif #define REALNUM_H5T (sizeof(realnum) == sizeof(double) ? H5T_NATIVE_DOUBLE : H5T_NATIVE_FLOAT) realnum *h5file::read(const char *dataname, int *rank, int *dims, int maxrank) { #ifdef HAVE_HDF5 realnum *data = 0; if (parallel || am_master()) { int i, N; hid_t file_id = HID(get_id()), space_id, data_id; CHECK(file_id >= 0, "error opening HDF5 input file"); bool close_data_id = true; if (dataname) { if (is_cur(dataname)) { data_id = HID(cur_id); close_data_id = false; } else { CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); } } else { // find first dataset in file char *dname = 0; CHECK(H5Giterate(file_id, "/",NULL, find_dataset,&dname) >= 0 && dname, "cannot find dataset in HDF5 file"); if (is_cur(dname)) { data_id = HID(cur_id); close_data_id = false; } else { data_id = H5Dopen(file_id, dname); } delete[] dname; } space_id = H5Dget_space(data_id); *rank = H5Sget_simple_extent_ndims(space_id); CHECK(*rank <= maxrank, "input array rank is too big"); hsize_t *dims_copy = new hsize_t[*rank]; hsize_t *maxdims = new hsize_t[*rank]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); delete[] maxdims; for (N = 1, i = 0; i < *rank; ++i) N *= (dims[i] = dims_copy[i]); delete[] dims_copy; H5Sclose(space_id); data = new realnum[N]; H5Dread(data_id, REALNUM_H5T, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *) data); if (close_data_id) H5Dclose(data_id); } if (!parallel) { *rank = broadcast(0, *rank); broadcast(0, dims, *rank); int N = 1; for (int i = 0; i < *rank; ++i) N *= dims[i]; if (!am_master()) data = new realnum[N]; broadcast(0, data, N); } if (*rank == 1 && dims[0] == 1) *rank = 0; return data; #else return NULL; #endif } char *h5file::read(const char *dataname) { #ifdef HAVE_HDF5 char *data = 0; int len = 0; if (parallel || am_master()) { hid_t file_id = HID(get_id()), space_id, data_id, type_id; CHECK(file_id >= 0, "error opening HDF5 input file"); if (is_cur(dataname)) unset_cur(); CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); space_id = H5Dget_space(data_id); type_id = H5Dget_type(data_id); CHECK(H5Sget_simple_extent_npoints(space_id) == 1, "expected single string in HDF5 file, but didn't get one"); len = H5Tget_size(type_id); H5Tclose(type_id); type_id = H5Tcopy(H5T_C_S1); H5Tset_size(type_id, len); data = new char[len]; H5Dread(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *) data); H5Tclose(type_id); H5Sclose(space_id); H5Dclose(data_id); } if (!parallel) { len = broadcast(0, len); if (!am_master()) data = new char[len]; broadcast(0, data, len); } return data; #else return NULL; #endif } /*****************************************************************************/ /* Delete a dataset, if it exists. In parallel mode, should be called by all processors. */ void h5file::remove_data(const char *dataname) { #ifdef HAVE_HDF5 hid_t file_id = HID(get_id()); if (is_cur(dataname)) unset_cur(); if (get_extending(dataname)) { // delete dataname from extending list extending_s *prev = 0, *cur = extending; for (; cur && strcmp(cur->dataname, dataname); cur = (prev = cur)->next) ; if (!cur) abort("bug in remove_data: inconsistent get_extending"); if (prev) prev->next = cur->next; else extending = cur->next; delete[] cur->dataname; delete cur; } if (dataset_exists(file_id, dataname)) { /* this is hackish ...need to pester HDF5 developers to make H5Gunlink a collective operation for parallel mode */ if (!parallel || am_master()) { H5Gunlink(file_id, dataname); /* delete it */ H5Fflush(file_id, H5F_SCOPE_GLOBAL); } IF_EXCLUSIVE((void) 0, if (parallel) all_wait()); } #endif } /* Create a dataset, for writing chunks etc. Note that, in parallel mode, this should be called by *all* processors, even those not writing any data. */ void h5file::create_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision) { #ifdef HAVE_HDF5 int i; hid_t file_id = HID(get_id()), space_id, data_id; int rank1; CHECK(rank >= 0, "negative rank"); // stupid HDF5 has problems with rank 0 rank1 = (rank == 0 && !append_data) ? 1 : rank; CHECK(file_id >= 0, "error opening HDF5 output file"); unset_cur(); remove_data(dataname); // HDF5 gives error if we H5Dcreate existing dataset if (IF_EXCLUSIVE(!parallel || am_master(), 1)) { hsize_t *dims_copy = new hsize_t[rank1 + append_data]; hsize_t *maxdims = new hsize_t[rank1 + append_data]; hsize_t N = 1; for (i = 0; i < rank; ++i) N *= (maxdims[i] = dims_copy[i] = dims[i]); if (!rank) maxdims[0] = dims_copy[0] = 1; if (append_data) { dims_copy[rank1] = 1; maxdims[rank1] = H5S_UNLIMITED; } space_id = H5Screate_simple(rank1 + append_data, dims_copy, maxdims); delete[] maxdims; /* For unlimited datasets, we need to specify the size of the "chunks" in which the file data is allocated. */ hid_t prop_id = H5Pcreate(H5P_DATASET_CREATE); if (append_data) { const int blocksize = 128; // make a chunk at least blocksize elements for efficiency dims_copy[rank1] = (blocksize + (N - 1)) / N; H5Pset_chunk(prop_id, rank1 + 1, dims_copy); dims_copy[rank1] = 1; } delete[] dims_copy; hid_t type_id = single_precision ? H5T_NATIVE_FLOAT : REALNUM_H5T; data_id = H5Dcreate(file_id, dataname, type_id, space_id, prop_id); if (data_id < 0) abort("Error creating dataset"); H5Pclose(prop_id); } else { data_id = H5Dopen(file_id, dataname); CHECK(data_id >= 0, "missing dataset for subsequent processor"); space_id = H5Dget_space(data_id); CHECK(rank1 + append_data == H5Sget_simple_extent_ndims(space_id), "file data is inconsistent rank for subsequent processor"); hsize_t *dims_copy = new hsize_t[rank1 + append_data]; hsize_t *maxdims = new hsize_t[rank1 + append_data]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); CHECK(!append_data || maxdims[rank1] == H5S_UNLIMITED, "file data is missing unlimited dimension for append_data"); delete[] maxdims; for (i = 0; i < rank; ++i) CHECK(dims[i] == (int) dims_copy[i], "file data is inconsistent size for subsequent processor"); if (rank < rank1) CHECK(dims_copy[0] == 1, "rank-0 data is incorrect size"); delete[] dims_copy; } set_cur(dataname, &data_id); H5Sclose(space_id); if (append_data) { extending_s *cur = new extending_s; cur->dataname = new char[strlen(dataname) + 1]; strcpy(cur->dataname, dataname); cur->dindex = 0; cur->next = extending; extending = cur; } #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /* Assumed data already created with append_data == true, and is already open; extends it and increments cur_dindex. Like create_data, this is a collective operation and must be called from all processes. */ void h5file::extend_data(const char *dataname, int rank, const int *dims) { #ifdef HAVE_HDF5 extending_s *cur = get_extending(dataname); CHECK(cur, "extend_data can only be called on extensible data"); hid_t file_id = HID(get_id()), data_id; if (is_cur(dataname)) data_id = HID(cur_id); else { data_id = H5Dopen(file_id, dataname); set_cur(dataname, &data_id); } hid_t space_id = H5Dget_space(data_id); CHECK(rank + 1 == H5Sget_simple_extent_ndims(space_id), "file data is inconsistent rank for subsequent extend_data"); hsize_t *dims_copy = new hsize_t[rank + 1]; hsize_t *maxdims = new hsize_t[rank + 1]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); CHECK(maxdims[rank] == H5S_UNLIMITED, "file data is missing unlimited dimension for extend_data"); delete[] maxdims; for (int i = 0; i < rank; ++i) CHECK(dims[i] == (int) dims_copy[i], "file data is inconsistent size for subsequent extend_data"); H5Sclose(space_id); // Allocate more space along unlimited direction cur->dindex++; dims_copy[rank] = cur->dindex + 1; H5Dextend(data_id, dims_copy); delete[] dims_copy; #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /* If append_data is true, dataname is the current dataset, and is extensible, then as extend_data; otherwise as create_data. */ void h5file::create_or_extend_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision) { if (get_extending(dataname)) extend_data(dataname, rank, dims); else create_data(dataname, rank, dims, append_data, single_precision); } /*****************************************************************************/ /* Write a chunk of data to dataset in HDF5 file. The dataset has dimension dims[rank], and we are writing a chunk stored at (row-major order) of size chunk_dims[rank], starting at chunk_start[rank]. You *must* have already called create_data for the same dimensions (and extend_data, if necessary). In the special case of rank == 0 (writing a single datum), chunk_dims[0] should still be initialized to 1 (if the given process is writing data) or 0 (if it is not). This function does *not* need to be called on all CPUs (e.g. those that have no data can be skipped). */ void h5file::write_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data) { #ifdef HAVE_HDF5 int i; bool do_write = true; hid_t space_id, mem_space_id, data_id = HID(cur_id); int rank1; extending_s *cur = get_extending(cur_dataname); bool append_data = cur != NULL; int dindex = cur ? cur->dindex : 0; CHECK(data_id >= 0, "create_data must be called before write_chunk"); CHECK(rank >= 0, "negative rank"); CHECK(rank > 0 || chunk_dims[0] == 0 || chunk_dims[0] == 1, "invalid chunk_dims[0] for rank 0"); // stupid HDF5 has problems with rank 0 rank1 = (rank == 0 && !append_data) ? 1 : rank; space_id = H5Dget_space(data_id); /*******************************************************************/ /* Before we can write the data to the data set, we must define the dimensions and "selections" of the arrays to be read & written: */ start_t *start = new start_t[rank1 + append_data]; hsize_t *count = new hsize_t[rank1 + append_data]; int count_prod = 1; for (i = 0; i < rank; ++i) { start[i] = chunk_start[i]; count[i] = chunk_dims[i]; count_prod *= count[i]; } if (!rank) { start[0] = 0; count[0] = chunk_dims[0]; // see comment at top count_prod *= count[0]; } if (append_data) { start[rank1] = dindex; count[rank1] = 1; } if (count_prod > 0) { H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL); mem_space_id = H5Screate_simple(!rank1 ? 1 : rank1, count, NULL); H5Sselect_all(mem_space_id); } else { /* this can happen on leftover processes in MPI */ H5Sselect_none(space_id); mem_space_id = H5Scopy(space_id); /* can't create an empty space */ H5Sselect_none(mem_space_id); do_write = false; /* HDF5 complains about empty dataspaces */ } delete[] start; delete[] count; /*******************************************************************/ /* Write the data, then free all the stuff we've allocated. */ if (do_write) H5Dwrite(data_id, REALNUM_H5T, mem_space_id, space_id, H5P_DEFAULT, (void *) data); H5Sclose(mem_space_id); H5Sclose(space_id); #else abort("not compiled with HDF5, required for HDF5 output"); #endif } // collective call after completing all write_chunk calls void h5file::done_writing_chunks() { /* hackery: in order to not deadlock when writing extensible datasets with a non-parallel version of HDF5, we need to close the file and release the lock after writing extensible chunks ...here, I'm assuming(?) that non-extensible datasets will use different files, etcetera, for different timesteps. All of this hackery goes away if we just use an MPI-compiled version of HDF5. */ if (parallel && cur_dataname && get_extending(cur_dataname)) prevent_deadlock(); // closes id } void h5file::write(const char *dataname, int rank, const int *dims, realnum *data, bool single_precision) { if (parallel || am_master()) { int *start = new int[rank + 1]; for (int i = 0; i < rank; i++) start[i] = 0; create_data(dataname, rank, dims, false, single_precision); if (am_master()) write_chunk(rank, start, dims, data); done_writing_chunks(); unset_cur(); delete[] start; } } void h5file::write(const char *dataname, const char *data) { #ifdef HAVE_HDF5 if (IF_EXCLUSIVE(am_master(), parallel || am_master())) { hid_t file_id = HID(get_id()), type_id, data_id, space_id; CHECK(file_id >= 0, "error opening HDF5 output file"); remove_data(dataname); // HDF5 gives error if we H5Dcreate existing dataset type_id = H5Tcopy(H5T_C_S1);; H5Tset_size(type_id, strlen(data) + 1); space_id = H5Screate(H5S_SCALAR); data_id = H5Dcreate(file_id, dataname, type_id, space_id, H5P_DEFAULT); if (am_master()) H5Dwrite(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); H5Sclose(space_id); H5Tclose(type_id); H5Dclose(data_id); } #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /*****************************************************************************/ /* Inverse of write_chunk, above. The caller must first get the total dataset's rank and dims first by calling read_size, above, (which also opens the dataset for reading). */ void h5file::read_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data) { #ifdef HAVE_HDF5 bool do_read = true; int rank1; hid_t space_id, mem_space_id, data_id = HID(cur_id); CHECK(data_id >= 0, "read_size must be called before read_chunk"); CHECK(rank >= 0, "negative rank"); CHECK(rank > 0 || chunk_dims[0] == 0 || chunk_dims[0] == 1, "invalid chunk_dims[0] for rank 0"); // stupid HDF5 has problems with rank 0 rank1 = rank == 0 ? 1 : rank; space_id = H5Dget_space(data_id); /*******************************************************************/ /* Before we can read the data from the data set, we must define the dimensions and "selections" of the arrays to be read & written: */ start_t *start = new start_t[rank1]; hsize_t *count = new hsize_t[rank1]; int count_prod = 1; for (int i = 0; i < rank; ++i) { start[i] = chunk_start[i]; count[i] = chunk_dims[i]; count_prod *= count[i]; } if (!rank) { start[0] = 0; count[0] = chunk_dims[0]; // see comment at top count_prod *= count[0]; } if (count_prod > 0) { H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL); mem_space_id = H5Screate_simple(rank1, count, NULL); H5Sselect_all(mem_space_id); } else { /* this can happen on leftover processes in MPI */ H5Sselect_none(space_id); mem_space_id = H5Scopy(space_id); /* can't create an empty space */ H5Sselect_none(mem_space_id); do_read = false; /* HDF5 complains about empty dataspaces */ } delete[] count; delete[] start; /*******************************************************************/ /* Read the data, then free all the stuff we've allocated. */ if (do_read) H5Dread(data_id, REALNUM_H5T, mem_space_id, space_id, H5P_DEFAULT, (void *) data); H5Sclose(mem_space_id); H5Sclose(space_id); #else abort("not compiled with HDF5, required for HDF5 input"); #endif } } // namespace meep meep-1.3/src/time.cpp0000644000175400001440000000432612506540456011471 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "meep.hpp" using namespace std; namespace meep { void fields::finished_working() { double now = wall_time(); if (last_wall_time >= 0) times_spent[working_on] += now - last_wall_time; last_wall_time = now; working_on = was_working_on[0]; for (int i = 0; i+1 < MEEP_TIMING_STACK_SZ; ++i) was_working_on[i] = was_working_on[i+1]; was_working_on[MEEP_TIMING_STACK_SZ-1] = Other; } void fields::am_now_working_on(time_sink s) { double now = wall_time(); if (last_wall_time >= 0) times_spent[working_on] += now - last_wall_time; last_wall_time = now; for (int i = 0; i+1 < MEEP_TIMING_STACK_SZ; ++i) was_working_on[i+1] = was_working_on[i]; was_working_on[0] = working_on; working_on = s; } double fields::time_spent_on(time_sink s) { return times_spent[s]; } static const char *ts2n(time_sink s) { switch (s) { case Stepping: return "time stepping"; case Connecting: return "connnecting chunks"; case Boundaries: return "copying borders"; case MpiTime: return "communicating"; case FieldOutput: return "outputting fields"; case FourierTransforming: return "Fourier transforming"; case Other: break; } return "everything else"; } static void pt(double ts[], time_sink s) { if (ts[s]) master_printf(" %18s: %g s\n", ts2n(s), ts[s]); } void fields::print_times() { master_printf("\nField time usage:\n"); for (int i=0;i<=Other;i++) pt(times_spent, (time_sink) i); master_printf("\n"); } } // namespace meep meep-1.3/src/susceptibility.cpp0000644000175400001440000002533412506540456013611 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This file implements dispersive materials for Meep via a polarization P = \chi(\omega) W, where W is e.g. E or H. Each subclass of the susceptibility class should implement a different type of \chi(\omega). The subclass knows how to timestep P given W at the current (and possibly previous) timestep, and any additional internal data that needs to be allocated along with P. Each \chi(\omega) is spatially multiplied by a (scalar) sigma array. The meep::fields class is responsible for allocating P and sigma and passing them to susceptibility::update_P. */ #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { int susceptibility::cur_id = 0; susceptibility *susceptibility::clone() const { susceptibility *sus = new susceptibility(*this); sus->next = 0; sus->ntot = ntot; sus->id = id; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { if (sigma[c][d]) { sus->sigma[c][d] = new realnum[ntot]; memcpy(sus->sigma[c][d], sigma[c][d], sizeof(realnum) * ntot); } else sus->sigma[c][d] = NULL; sus->trivial_sigma[c][d] = trivial_sigma[c][d]; } return sus; } void susceptibility::delete_internal_data(void *data) const { free(data); } /* Return whether or not we need to allocate P[c][cmp]. (We don't need to allocate P[c] if we can be sure it will be zero.) We are a bit wasteful because if sigma is nontrivial in *any* chunk, we allocate the corresponding P on *every* owned chunk. This greatly simplifies communication in boundaries.cpp, because we can be sure that one chunk has a P then any chunk it borders has the same P, so we don't have to worry about communicating with something that doesn't exist. TODO: reduce memory usage (bookkeeping seem much harder, though). */ bool susceptibility::needs_P(component c, int cmp, realnum *W[NUM_FIELD_COMPONENTS][2]) const { if (!is_electric(c) && !is_magnetic(c)) return false; FOR_DIRECTIONS(d) if (!trivial_sigma[c][d] && W[direction_component(c, d)][cmp]) return true; return false; } /* return whether we need the notowned parts of the W field -- by default, this is only the case if sigma has offdiagonal components coupling P to W. (See needs_P: again, this true if the notowned W is needed in *any* chunk.) */ bool susceptibility::needs_W_notowned(component c, realnum *W[NUM_FIELD_COMPONENTS][2]) const { FOR_DIRECTIONS(d) if (d != component_direction(c)) { component cP = direction_component(c, d); if (needs_P(cP, 0, W) && !trivial_sigma[cP][component_direction(c)]) return true; } return false; } typedef struct { size_t sz_data; int ntot; realnum *P[NUM_FIELD_COMPONENTS][2]; realnum *P_prev[NUM_FIELD_COMPONENTS][2]; realnum data[1]; } lorentzian_data; // for Lorentzian susc. the internal data is just a backup of P from // the previous timestep. void *lorentzian_susceptibility::new_internal_data( realnum *W[NUM_FIELD_COMPONENTS][2], const grid_volume &gv) const { int num = 0; FOR_COMPONENTS(c) DOCMP2 if (needs_P(c, cmp, W)) num += 2 * gv.ntot(); size_t sz = sizeof(lorentzian_data) + sizeof(realnum) * (num - 1); lorentzian_data *d = (lorentzian_data *) malloc(sz); d->sz_data = sz; return (void*) d; } void lorentzian_susceptibility::init_internal_data( realnum *W[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *data) const { (void) dt; // unused lorentzian_data *d = (lorentzian_data *) data; size_t sz_data = d->sz_data; memset(d, 0, sz_data); d->sz_data = sz_data; int ntot = d->ntot = gv.ntot(); realnum *P = d->data; realnum *P_prev = d->data + ntot; FOR_COMPONENTS(c) DOCMP2 if (needs_P(c, cmp, W)) { d->P[c][cmp] = P; d->P_prev[c][cmp] = P_prev; P += 2*ntot; P_prev += 2*ntot; } } void *lorentzian_susceptibility::copy_internal_data(void *data) const { lorentzian_data *d = (lorentzian_data *) data; if (!d) return 0; lorentzian_data *dnew = (lorentzian_data *) malloc(d->sz_data); memcpy(dnew, d, d->sz_data); int ntot = d->ntot; realnum *P = dnew->data; realnum *P_prev = dnew->data + ntot; FOR_COMPONENTS(c) DOCMP2 if (d->P[c][cmp]) { dnew->P[c][cmp] = P; dnew->P_prev[c][cmp] = P_prev; P += 2*ntot; P_prev += 2*ntot; } return (void*) dnew; } /* Return true if the discretized Lorentzian ODE is intrinsically unstable, i.e. if it corresponds to a filter with a pole z outside the unit circle. Note that the pole satisfies the quadratic equation: (z + 1/z - 2)/dt^2 + g*(z - 1/z)/(2*dt) + w^2 = 0 where w = 2*pi*omega_0 and g = 2*pi*gamma. It is just a little algebra from this to get the condition for a root with |z| > 1. */ static bool lorentzian_unstable(double omega_0, double gamma, double dt) { double w = 2*pi*omega_0, g = 2*pi*gamma; double g2 = g*dt/2, w2 = (w*dt)*(w*dt); double b = (1 - w2/2) / (1 + g2), c = (1 - g2) / (1 + g2); return b*b > c && 2*b*b - c + 2*fabs(b)*sqrt(b*b - c) > 1; } #define SWAP(t,a,b) { t SWAP_temp = a; a = b; b = SWAP_temp; } // stable averaging of offdiagonal components #define OFFDIAG(u,g,sx,s) (0.25 * ((g[i]+g[i-sx])*u[i] \ + (g[i+s]+g[(i+s)-sx])*u[i+s])) void lorentzian_susceptibility::update_P (realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const { lorentzian_data *d = (lorentzian_data *) P_internal_data; const double omega2pi = 2*pi*omega_0, g2pi = gamma*2*pi; const double omega0dtsqr = omega2pi * omega2pi * dt * dt; const double gamma1inv = 1 / (1 + g2pi*dt/2), gamma1 = (1 - g2pi*dt/2); const double omega0dtsqr_denom = no_omega_0_denominator ? 0 : omega0dtsqr; (void) W_prev; // unused; if (!no_omega_0_denominator && gamma >= 0 && lorentzian_unstable(omega_0, gamma, dt)) abort("Lorentzian pole at too high a frequency %g for stability with dt = %g: reduce the Courant factor, increase the resolution, or use a different dielectric model\n", omega_0, dt); FOR_COMPONENTS(c) DOCMP2 if (d->P[c][cmp]) { const realnum *w = W[c][cmp], *s = sigma[c][component_direction(c)]; if (w && s) { realnum *p = d->P[c][cmp], *pp = d->P_prev[c][cmp]; // directions/strides for offdiagonal terms, similar to update_eh const direction d = component_direction(c); const int is = gv.stride(d) * (is_magnetic(c) ? -1 : +1); direction d1 = cycle_direction(gv.dim, d, 1); component c1 = direction_component(c, d1); int is1 = gv.stride(d1) * (is_magnetic(c) ? -1 : +1); const realnum *w1 = W[c1][cmp]; const realnum *s1 = w1 ? sigma[c][d1] : NULL; direction d2 = cycle_direction(gv.dim, d, 2); component c2 = direction_component(c, d2); int is2 = gv.stride(d2) * (is_magnetic(c) ? -1 : +1); const realnum *w2 = W[c2][cmp]; const realnum *s2 = w2 ? sigma[c][d2] : NULL; if (s2 && !s1) { // make s1 the non-NULL one if possible SWAP(direction, d1, d2); SWAP(component, c1, c2); SWAP(int, is1, is2); SWAP(const realnum *, w1, w2); SWAP(const realnum *, s1, s2); } if (s1 && s2) { // 3x3 anisotropic LOOP_OVER_VOL_OWNED(gv, c, i) { realnum pcur = p[i]; p[i] = gamma1inv * (pcur * (2 - omega0dtsqr_denom) - gamma1 * pp[i] + omega0dtsqr * (s[i] * w[i] + OFFDIAG(s1,w1,is1,is) + OFFDIAG(s2,w2,is2,is))); pp[i] = pcur; } } else if (s1) { // 2x2 anisotropic LOOP_OVER_VOL_OWNED(gv, c, i) { realnum pcur = p[i]; p[i] = gamma1inv * (pcur * (2 - omega0dtsqr_denom) - gamma1 * pp[i] + omega0dtsqr * (s[i] * w[i] + OFFDIAG(s1,w1,is1,is))); pp[i] = pcur; } } else { // isotropic LOOP_OVER_VOL_OWNED(gv, c, i) { realnum pcur = p[i]; p[i] = gamma1inv * (pcur * (2 - omega0dtsqr_denom) - gamma1 * pp[i] + omega0dtsqr * (s[i] * w[i])); pp[i] = pcur; } } } } } void lorentzian_susceptibility::subtract_P(field_type ft, realnum *f_minus_p[NUM_FIELD_COMPONENTS][2], void *P_internal_data) const { lorentzian_data *d = (lorentzian_data *) P_internal_data; field_type ft2 = ft == E_stuff ? D_stuff : B_stuff; // for sources etc. int ntot = d->ntot; FOR_FT_COMPONENTS(ft, ec) DOCMP2 if (d->P[ec][cmp]) { component dc = field_type_component(ft2, ec); if (f_minus_p[dc][cmp]) { realnum *p = d->P[ec][cmp]; realnum *fmp = f_minus_p[dc][cmp]; for (int i = 0; i < ntot; ++i) fmp[i] -= p[i]; } } } int lorentzian_susceptibility::num_cinternal_notowned_needed(component c, void *P_internal_data) const { lorentzian_data *d = (lorentzian_data *) P_internal_data; return d->P[c][0] ? 1 : 0; } realnum *lorentzian_susceptibility::cinternal_notowned_ptr( int inotowned, component c, int cmp, int n, void *P_internal_data) const { lorentzian_data *d = (lorentzian_data *) P_internal_data; (void) inotowned; // always = 0 if (!d || !d->P[c][cmp]) return NULL; return d->P[c][cmp] + n; } void noisy_lorentzian_susceptibility::update_P (realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const { lorentzian_susceptibility::update_P(W, W_prev, dt, gv, P_internal_data); lorentzian_data *d = (lorentzian_data *) P_internal_data; const double g2pi = gamma*2*pi; const double w2pi = omega_0*2*pi; const double amp = w2pi * noise_amp * sqrt(g2pi) * dt*dt / (1 + g2pi*dt/2); /* for uniform random numbers in [-amp,amp] below, multiply amp by sqrt(3) */ FOR_COMPONENTS(c) DOCMP2 if (d->P[c][cmp]) { const realnum *s = sigma[c][component_direction(c)]; if (s) { realnum *p = d->P[c][cmp]; LOOP_OVER_VOL_OWNED(gv, c, i) p[i] += gaussian_random(0, amp * sqrt(s[i])); // for uniform random numbers, use uniform_random(-1,1) * amp * sqrt(s[i]) // for gaussian random numbers, use gaussian_random(0, amp * sqrt(s[i])) } } } } // namespace meep meep-1.3/src/multilevel-atom.cpp0000644000175400001440000003100012506540456013640 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* this file implements multilevel atomic materials for Meep */ #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" using namespace std; namespace meep { multilevel_susceptibility::multilevel_susceptibility(int theL, int theT, const realnum *theGamma, const realnum *theN0, const realnum *thealpha, const realnum *theomega, const realnum *thegamma, const realnum *thesigmat) { L = theL; T = theT; Gamma = new realnum[L*L]; memcpy(Gamma, theGamma, sizeof(realnum) * L*L); N0 = new realnum[L]; memcpy(N0, theN0, sizeof(realnum) * L); alpha = new realnum[L*T]; memcpy(alpha, thealpha, sizeof(realnum) * L*T); omega = new realnum[T]; memcpy(omega, theomega, sizeof(realnum) * T); gamma = new realnum[T]; memcpy(gamma, thegamma, sizeof(realnum) * T); sigmat = new realnum[T * 5]; memcpy(sigmat, thesigmat, sizeof(realnum) * T * 5); } multilevel_susceptibility::multilevel_susceptibility(const multilevel_susceptibility &from) : susceptibility(from) { L = from.L; T = from.T; Gamma = new realnum[L*L]; memcpy(Gamma, from.Gamma, sizeof(realnum) * L*L); N0 = new realnum[L]; memcpy(N0, from.N0, sizeof(realnum) * L); alpha = new realnum[L*T]; memcpy(alpha, from.alpha, sizeof(realnum) * L*T); omega = new realnum[T]; memcpy(omega, from.omega, sizeof(realnum) * T); gamma = new realnum[T]; memcpy(gamma, from.gamma, sizeof(realnum) * T); sigmat = new realnum[T * 5]; memcpy(sigmat, from.sigmat, sizeof(realnum) * T * 5); } multilevel_susceptibility::~multilevel_susceptibility() { delete[] Gamma; delete[] N0; delete[] alpha; delete[] omega; delete[] gamma; delete[] sigmat; } #if MEEP_SINGLE # define DGETRF F77_FUNC(sgetrf,SGETRF) # define DGETRI F77_FUNC(sgetri,SGETRI) #else # define DGETRF F77_FUNC(dgetrf,DGETRF) # define DGETRI F77_FUNC(dgetri,DGETRI) #endif extern "C" void DGETRF(const int *m,const int *n,realnum *A,const int *lda,int *ipiv,int *info); extern "C" void DGETRI(const int *n,realnum *A,const int *lda,int *ipiv,realnum *work,int *lwork,int *info); /* S -> inv(S), where S is a p x p matrix in row-major order */ static bool invert(realnum *S, int p) { #ifdef HAVE_LAPACK int info; int *ipiv = new int[p]; DGETRF(&p, &p, S, &p, ipiv, &info); if (info < 0) abort("invalid argument %d in DGETRF", -info); if (info > 0) { delete[] ipiv; return false; } // singular int lwork = -1; realnum work1; DGETRI(&p, S, &p, ipiv, &work1, &lwork, &info); if (info != 0) abort("error %d in DGETRI workspace query", info); lwork = int(work1); realnum *work = new realnum[lwork]; DGETRI(&p, S, &p, ipiv, work, &lwork, &info); if (info < 0) abort("invalid argument %d in DGETRI", -info); delete[] work; delete[] ipiv; return info == 0; #else /* !HAVE_LAPACK */ abort("LAPACK is needed for multilevel-atom support"); return false; #endif } typedef realnum *realnumP; typedef struct { size_t sz_data; int ntot; realnum *GammaInv; // inv(1 + Gamma * dt / 2) realnumP *P[NUM_FIELD_COMPONENTS][2]; // P[c][cmp][transition][i] realnumP *P_prev[NUM_FIELD_COMPONENTS][2]; realnum *N; // ntot x L array of centered grid populations N[i*L + level] realnum *Ntmp; // temporary length L array of levels, used in updating realnum data[1]; } multilevel_data; void *multilevel_susceptibility::new_internal_data( realnum *W[NUM_FIELD_COMPONENTS][2], const grid_volume &gv) const { int num = 0; // number of P components FOR_COMPONENTS(c) DOCMP2 if (needs_P(c, cmp, W)) num += 2 * gv.ntot(); size_t sz = sizeof(multilevel_data) + sizeof(realnum) * (L*L + L + gv.ntot()*L + num*T - 1); multilevel_data *d = (multilevel_data *) malloc(sz); memset(d, 0, sz); d->sz_data = sz; return (void*) d; } void multilevel_susceptibility::init_internal_data( realnum *W[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *data) const { multilevel_data *d = (multilevel_data *) data; size_t sz_data = d->sz_data; memset(d, 0, sz_data); d->sz_data = sz_data; int ntot = d->ntot = gv.ntot(); /* d->data points to a big block of data that holds GammaInv, P, P_prev, Ntmp, and N. We also initialize a bunch of convenience pointer in d to point to the corresponding data in d->data, so that we don't have to remember in other functions how d->data is laid out. */ d->GammaInv = d->data; for (int i = 0; i < L; ++i) for (int j = 0; j < L; ++j) d->GammaInv[i*L + j] = (i == j) + Gamma[i*L + j] * dt/2; if (!invert(d->GammaInv, L)) abort("multilevel_susceptibility: I + Gamma*dt/2 matrix singular"); realnum *P = d->data + L*L; realnum *P_prev = P + ntot; FOR_COMPONENTS(c) DOCMP2 if (needs_P(c, cmp, W)) { d->P[c][cmp] = new realnumP[T]; d->P_prev[c][cmp] = new realnumP[T]; for (int t = 0; t < T; ++t) { d->P[c][cmp][t] = P; d->P_prev[c][cmp][t] = P_prev; P += 2*ntot; P_prev += 2*ntot; } } d->Ntmp = P; d->N = P + L; // the last L*ntot block of the data // initial populations for (int i = 0; i < ntot; ++i) for (int l = 0; l < L; ++l) d->N[i*L + l] = N0[l]; } void multilevel_susceptibility::delete_internal_data(void *data) const { if (data) { multilevel_data *d = (multilevel_data *) data; FOR_COMPONENTS(c) DOCMP2 { delete[] d->P[c][cmp]; delete[] d->P_prev[c][cmp]; } free(data); } } void *multilevel_susceptibility::copy_internal_data(void *data) const { multilevel_data *d = (multilevel_data *) data; if (!d) return 0; multilevel_data *dnew = (multilevel_data *) malloc(d->sz_data); memcpy(dnew, d, d->sz_data); int ntot = d->ntot; dnew->GammaInv = dnew->data; realnum *P = dnew->data + L*L; realnum *P_prev = P + ntot; FOR_COMPONENTS(c) DOCMP2 if (d->P[c][cmp]) { dnew->P[c][cmp] = new realnumP[T]; dnew->P_prev[c][cmp] = new realnumP[T]; for (int t = 0; t < T; ++t) { dnew->P[c][cmp][t] = P; dnew->P_prev[c][cmp][t] = P_prev; P += 2*ntot; P_prev += 2*ntot; } } dnew->Ntmp = P; dnew->N = P + L; return (void*) dnew; } int multilevel_susceptibility::num_cinternal_notowned_needed(component c, void *P_internal_data) const { multilevel_data *d = (multilevel_data *) P_internal_data; return d->P[c][0] ? T : 0; } realnum *multilevel_susceptibility::cinternal_notowned_ptr( int inotowned, component c, int cmp, int n, void *P_internal_data) const { multilevel_data *d = (multilevel_data *) P_internal_data; if (!d->P[c][cmp] || inotowned < 0 || inotowned >= T) // never true return NULL; return d->P[c][cmp][inotowned] + n; } void multilevel_susceptibility::update_P (realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const { multilevel_data *d = (multilevel_data *) P_internal_data; double dt2 = 0.5 * dt; // field directions and offsets for E * dP dot product. component cdot[3] = {Dielectric,Dielectric,Dielectric}; int o1[3], o2[3]; int idot = 0; FOR_COMPONENTS(c) if (d->P[c][0]) { if (idot == 3) abort("bug in meep: too many polarization components"); gv.yee2cent_offsets(c, o1[idot], o2[idot]); cdot[idot++] = c; } // update N from W and P realnum *GammaInv = d->GammaInv; realnum *Ntmp = d->Ntmp; LOOP_OVER_VOL_OWNED(gv, Centered, i) { realnum *N = d->N + i*L; // N at current point, to update // Ntmp = (I - Gamma * dt/2) * N for (int l1 = 0; l1 < L; ++l1) { Ntmp[l1] = (1.0 - Gamma[l1*L + l1]*dt2) * N[l1]; // diagonal term for (int l2 = 0; l2 < l1; ++l2) Ntmp[l1] -= Gamma[l1*L+l2]*dt2 * N[l2]; for (int l2 = l1+1; l2 < L; ++l2) Ntmp[l1] -= Gamma[l1*L+l2]*dt2 * N[l2]; } // compute E*8 at point i double E8[3][2]; for (idot = 0; idot < 3 && cdot[idot] != Dielectric; ++idot) { realnum *w = W[cdot[idot]][0], *wp = W_prev[cdot[idot]][0]; E8[idot][0] = w[i]+w[i+o1[idot]]+w[i+o2[idot]]+w[i+o1[idot]+o2[idot]] + wp[i]+wp[i+o1[idot]]+wp[i+o2[idot]]+wp[i+o1[idot]+o2[idot]]; if (W[cdot[idot]][1]) { w = W[cdot[idot]][1]; wp = W_prev[cdot[idot]][1]; E8[idot][1] = w[i]+w[i+o1[idot]]+w[i+o2[idot]]+w[i+o1[idot]+o2[idot]] + wp[i]+wp[i+o1[idot]]+wp[i+o2[idot]]+wp[i+o1[idot]+o2[idot]]; } else E8[idot][1] = 0; } // Ntmp = Ntmp + alpha * E * dP for (int t = 0; t < T; ++t) { // compute 32 * E * dP at point i double EdP32 = 0; for (idot = 0; idot < 3 && cdot[idot] != Dielectric; ++idot) { realnum *p = d->P[cdot[idot]][0][t], *pp = d->P_prev[cdot[idot]][0][t]; realnum dP = p[i]+p[i+o1[idot]]+p[i+o2[idot]]+p[i+o1[idot]+o2[idot]] - (pp[i]+pp[i+o1[idot]]+pp[i+o2[idot]]+pp[i+o1[idot]+o2[idot]]); EdP32 += dP * E8[idot][0]; if (d->P[cdot[idot]][1]) { p = d->P[cdot[idot]][1][t]; pp = d->P_prev[cdot[idot]][1][t]; dP = p[i]+p[i+o1[idot]]+p[i+o2[idot]]+p[i+o1[idot]+o2[idot]] + (pp[i]+pp[i+o1[idot]]+pp[i+o2[idot]]+pp[i+o1[idot]+o2[idot]]); EdP32 += dP * E8[idot][1]; } } EdP32 *= 0.03125; /* divide by 32 */ for (int l = 0; l < L; ++l) Ntmp[l] += alpha[l*T + t] * EdP32; } // N = GammaInv * Ntmp for (int l1 = 0; l1 < L; ++l1) { N[l1] = 0; for (int l2 = 0; l2 < L; ++l2) N[l1] += GammaInv[l1*L+l2] * Ntmp[l2]; } } // each P is updated as a damped harmonic oscillator for (int t = 0; t < T; ++t) { const double omega2pi = 2*pi*omega[t], g2pi = gamma[t]*2*pi; const double omega0dtsqr = omega2pi * omega2pi * dt * dt; const double gamma1inv = 1 / (1 + g2pi*dt/2), gamma1 = (1 - g2pi*dt/2); // figure out which levels this transition couples int lp = -1, lm = -1; for (int l = 0; l < L; ++l) { if (alpha[l*T + t] > 0) lp = l; if (alpha[l*T + t] < 0) lm = l; } if (lp < 0 || lm < 0) abort("invalid alpha array for transition %d", t); FOR_COMPONENTS(c) DOCMP2 if (d->P[c][cmp]) { const realnum *w = W[c][cmp], *s = sigma[c][component_direction(c)]; const double st = sigmat[5*t + component_direction(c)]; if (w && s) { realnum *p = d->P[c][cmp][t], *pp = d->P_prev[c][cmp][t]; int o1, o2; gv.cent2yee_offsets(c, o1, o2); o1 *= L; o2 *= L; const realnum *N = d->N; // directions/strides for offdiagonal terms, similar to update_eh const direction d = component_direction(c); direction d1 = cycle_direction(gv.dim, d, 1); component c1 = direction_component(c, d1); const realnum *w1 = W[c1][cmp]; const realnum *s1 = w1 ? sigma[c][d1] : NULL; direction d2 = cycle_direction(gv.dim, d, 2); component c2 = direction_component(c, d2); const realnum *w2 = W[c2][cmp]; const realnum *s2 = w2 ? sigma[c][d2] : NULL; if (s1 || s2) { abort("nondiagonal saturable gain is not yet supported"); } else { // isotropic LOOP_OVER_VOL_OWNED(gv, c, i) { realnum pcur = p[i]; const realnum *Ni = N + i*L; // dNi is population inversion for this transition double dNi = -0.25 * (Ni[lp]+Ni[lp+o1]+Ni[lp+o2]+Ni[lp+o1+o2] -Ni[lm]-Ni[lm+o1]-Ni[lm+o2]-Ni[lm+o1+o2]); p[i] = gamma1inv * (pcur * (2 - omega0dtsqr) - gamma1 * pp[i] + omega0dtsqr * (st * s[i] * w[i])) * dNi; pp[i] = pcur; } } } } } } void multilevel_susceptibility::subtract_P(field_type ft, realnum *f_minus_p[NUM_FIELD_COMPONENTS][2], void *P_internal_data) const { multilevel_data *d = (multilevel_data *) P_internal_data; field_type ft2 = ft == E_stuff ? D_stuff : B_stuff; // for sources etc. int ntot = d->ntot; for (int t = 0; t < T; ++t) { FOR_FT_COMPONENTS(ft, ec) DOCMP2 if (d->P[ec][cmp]) { component dc = field_type_component(ft2, ec); if (f_minus_p[dc][cmp]) { realnum *p = d->P[ec][cmp][t]; realnum *fmp = f_minus_p[dc][cmp]; for (int i = 0; i < ntot; ++i) fmp[i] -= p[i]; } } } } } meep-1.3/src/random.cpp0000644000175400001440000000453312506540456012013 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "config.h" #ifdef HAVE_LIBGSL # include #else # include #endif #include using namespace std; namespace meep { static bool rand_inited = false; #ifdef HAVE_LIBGSL static gsl_rng *rng = NULL; #endif static void init_rand(void) { if (!rand_inited) { #ifdef HAVE_LIBGSL if (rng) gsl_rng_free(rng); rng = gsl_rng_alloc(gsl_rng_mt19937); #endif rand_inited = true; // no infinite loop since rand_inited == true set_random_seed(time(NULL) * (1 + my_global_rank())); } } void set_random_seed(unsigned long seed) { init_rand(); seed = ((unsigned long) broadcast(0, (int) seed)) + my_rank(); #ifdef HAVE_LIBGSL gsl_rng_set(rng, seed); #else srand(seed); #endif } int random_int(int a, int b) { init_rand(); #ifdef HAVE_LIBGSL return ((int) gsl_rng_uniform_int(rng, b-a+1)) + a; #else return a + rand() % (b-a+1); #endif } double uniform_random(double a, double b) { init_rand(); #ifdef HAVE_LIBGSL return a + gsl_rng_uniform(rng) * (b-a); #else return a + rand() * (b-a) / RAND_MAX; #endif } double gaussian_random(double mean, double stddev) { init_rand(); #ifdef HAVE_LIBGSL return mean + gsl_ran_gaussian(rng, stddev); #else // Box-Muller algorithm to generate Gaussian from uniform // see Knuth vol II algorithm P, sec. 3.4.1 double v1, v2, s; do { v1 = uniform_random(-1, 1); v2 = uniform_random(-1, 1); s = v1*v1 + v2*v2; } while (s >= 1.0); if (s == 0) { return mean; } else { return mean + v1 * sqrt(-2 * log(s) / s) * stddev; } #endif } } meep-1.3/src/casimir.cpp0000644000175400001440000002672512506540456012171 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Functions to speed up Casimir-force calculations using FDTD. It is possible to use the unmodified Meep, but if you do this from Scheme it is rather slow to perform the stress-tensor integration, and also the FFT to compute g(t) is moderately painful in Scheme. Of course, you could just use Meep's C++ interface, but to make it more user-friendly we implement the following functions to speed up a Scheme front-end implementation of the Casimir calculation. */ #include #include #include "meep.hpp" #include "config.h" #if defined(HAVE_LIBFFTW) # include #elif defined(HAVE_LIBFFTW3) # include #endif using namespace std; namespace meep { typedef complex C; /* Return an array of values of the g(t) function, for times [0,T] with steps dt, for a given Casimir conductivity sigma. If there is any additional frequency dependence of the dielectric function, eps_func(omega) should equal eps(omega)/eps(infinity); note that the omega argument will be complex. If Tfft is passed, it is a time (should be > T) giving extra resolution for the Fourier transform. If ft is E_stuff or D_stuff, g(t) is evaluated at n*dt timesteps corresponding to the electric field; if ft is H_stuff or B_stuff we evaluate at (n-0.5)*dt timesteps corresponding to the magnetic field. */ complex *make_casimir_gfunc(double T, double dt, double sigma, field_type ft, complex (*eps_func)(complex omega), double Tfft) { double tshift = (ft == E_stuff || ft == D_stuff) ? 0.0 : -0.5*dt; T += 5 * dt; // allocate a few extra timesteps just in case // set some reasonable defaults if (Tfft <= T) Tfft = T * 100; // * 10 is not enough if (Tfft <= 1000) Tfft = 1000; int Nfft = int(ceil(Tfft / dt)); C *dg = new C[Nfft]; C eps0(1.0,0); for (int i = 0; i < Nfft; ++i) dg[i] = 0; for (int i = 1; i < Nfft/2; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = C(0,-xi) * sqrt(C(1.0, sigma/xi)) * C(1.0, 0.5*sigma/xi); } dg[0] = -sigma; if (eps_func){ eps0 = eps_func(0.0); // != 1 in general for (int i = 1; i < Nfft/2 ; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] * eps_func(xi * sqrt(C(1.0, sigma/xi))); } } for (int i = 1; i < Nfft/2; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] - (C(sigma, -xi) + 0.5 * eps0 * sqrt(C(0.0, (sigma*sigma*sigma) / xi))); } if (tshift != 0.0){ // time shift: for (int i = 1; i < Nfft/2 ; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] * polar(1.0, xi * tshift); } } #if defined(HAVE_LIBFFTW) fftw_plan p; p = fftw_create_plan(Nfft, FFTW_BACKWARD, FFTW_ESTIMATE | FFTW_IN_PLACE); fftw_one(p, reinterpret_cast(dg), NULL); fftw_destroy_plan(p); #elif defined(HAVE_LIBFFTW3) fftw_plan p; p = fftw_plan_dft_1d(Nfft, reinterpret_cast(dg), reinterpret_cast(dg), FFTW_BACKWARD, FFTW_ESTIMATE); fftw_execute(p); fftw_destroy_plan(p); #else abort("make_casimir_g requires some version of FFTW"); #endif int N = int(ceil(T / dt)); C *g = new C[N]; g[0] = 0; double dxi = 1.0 / (Nfft * dt); for (int i = 1; i < N; ++i) { double t = i * dt + tshift; g[i] = 2.0 * (dg[i] * dxi + (C(0.0,1.0) * ((1/(t*t) + sigma/t) / (2*pi) + 0.25 * eps0 * sqrt(sigma*sigma*sigma/(t*pi))))); } delete[] dg; return g; } typedef struct { double kx, ky, kz; double x0, y0, z0; direction xd, yd, zd; complex sum; double dV; } stress_data; /* chunkloop for the low-level loop_in_chunks routine, to do the Casimir stress-tensor integration. We use this rather than fields::integrate because we need to *omit* the 2*pi*r Jacobian factor in cylindrical coordinates (which is cancelled by the delta-function normalization in the overall Casimir expression). */ static void stress_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; (void) dV0; (void) dV1; // unused stress_data *d = (stress_data *) data_; complex sum = 0.0; complex ph; double dV = d->dV; ph = shift_phase * S.phase_shift(cgrid, sn); if (!fc->f[cgrid][0]) return; vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; double fre, fim; fre = fc->f[cgrid][0][idx]; fim = fc->f[cgrid][1] ? fc->f[cgrid][1][idx] : 0.0; complex fval = complex(fre, fim) * ph; sum += fval * (cos(d->kx * (loc.in_direction(d->xd) - d->x0)) * cos(d->ky * (loc.in_direction(d->yd) - d->y0)) * cos(d->kz * (loc.in_direction(d->zd) - d->z0)) * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV)); } d->sum += sum; } // Identical to stress_chunkloop above, except that we use bloch functions // exp(i k x) instead of cosine functions static void stress_chunkloop_bloch(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; (void) dV0; (void) dV1; // unused stress_data *d = (stress_data *) data_; complex sum = 0.0; complex ph; double dV = d->dV; ph = shift_phase * S.phase_shift(cgrid, sn); if (!fc->f[cgrid][0]) return; vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; double fre, fim; fre = fc->f[cgrid][0][idx]; fim = fc->f[cgrid][1] ? fc->f[cgrid][1][idx] : 0.0; complex fval = complex(fre, fim) * ph; // coordinate origin is taken to be the center of the unit cell sum += fval * polar(1.0, - d->kx * (loc.in_direction(d->xd) - d->x0) - d->ky * (loc.in_direction(d->yd) - d->y0) - d->kz * (loc.in_direction(d->zd) - d->z0)) * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV); } d->sum += sum; } complex fields::casimir_stress_dct_integral(direction dforce, direction dsource, double mx, double my, double mz, field_type ft, volume where, bool is_bloch) { direction dnormal = normal_direction(where); direction dcomponent = NO_DIRECTION; // relevant component of field to integrate over double coefficient = 1.0; if (where.dim != gv.dim) abort("invalid dimesionality in casimir_stress_dct_integral"); if (coordinate_mismatch(gv.dim,dforce) || coordinate_mismatch(gv.dim,dsource)) abort("invalid directions in casimir_stress_dct_integral"); if (dnormal == NO_DIRECTION) abort("invalid integration surface in casimir_stress_dct_integral"); if (ft != E_stuff && ft != H_stuff) abort("invalid field type in casimir_stress_dct_integral"); if (dforce != dnormal && dsource != dnormal) return 0.0; else if (dforce != dnormal && dsource == dnormal) { // force-source offdiagonal term dcomponent = dforce; } else if (dforce == dnormal && dsource == dnormal) { // +source-source/2 diagonal term dcomponent = dsource; coefficient = +0.5; } else /* if (dforce == dnormal && dsource != dnormal) */ { // -source-source/2 diagonal term dcomponent = dsource; coefficient = -0.5; } component c = direction_component(first_field_component(ft), dcomponent); stress_data data; data.zd = Z; if (gv.dim == Dcyl) { data.xd = R; data.yd = P; } else { data.xd = X; data.yd = Y; } if (has_direction(gv.dim, data.xd) && where.in_direction(data.xd) > 0) { data.x0 = !is_bloch ? where.in_direction_min(data.xd) : (0.5 * (where.in_direction_min(data.xd) + where.in_direction_max(data.xd))); data.kx = mx * pi / (!is_bloch ? where.in_direction(data.xd) : 1.0); coefficient *= sqrt((mx == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.xd)); } else { data.xd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.x0 = data.kx = 0; // innocuous values: ignore this dir } if (has_direction(gv.dim, data.yd) && where.in_direction(data.yd) > 0) { data.y0 = !is_bloch ? where.in_direction_min(data.yd) : (0.5 * (where.in_direction_min(data.yd) + where.in_direction_max(data.yd))); data.ky = my * pi / (!is_bloch ? where.in_direction(data.yd) : 1.0); coefficient *= sqrt((my == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.yd)); } else { data.yd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.y0 = data.ky = 0; // innocuous values: ignore this dir } if (has_direction(gv.dim, data.zd) && where.in_direction(data.zd) > 0) { data.z0 = !is_bloch ? where.in_direction_min(data.zd) : (0.5 * (where.in_direction_min(data.zd) + where.in_direction_max(data.zd))); data.kz = mz * pi / (!is_bloch ? where.in_direction(data.zd) : 1.0); coefficient *= sqrt((mz == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.zd)); } else { data.zd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.z0 = data.kz = 0; // innocuous values: ignore this dir } coefficient *= (ft==E_stuff ? get_eps(where.center()) : get_mu(where.center())); data.sum = 0.0; data.dV = 1.0; LOOP_OVER_DIRECTIONS(gv.dim, d) if (where.in_direction(d) > 0.0) data.dV *= gv.inva; if (is_bloch) //complex exponentials exp(i m x) loop_in_chunks(stress_chunkloop_bloch, &data, where, c); else //cosine functions for closed surfaces loop_in_chunks(stress_chunkloop, &data, where, c); data.sum = sum_to_all(data.sum); return coefficient * complex(real(data.sum), imag(data.sum)); } /* Similar to make_g above, but now air/metal systems translation-invariant in one direction. In this case, the kz-integral turns into a multiplication by -i/4*w(xi), and we simply solve the (lower-dimensional) kz = 0 system and multiply the the g(t) obtained from this result, rather than the usual g(t). This function has the nice property that we can do the integral analytically. */ complex *make_casimir_gfunc_kz(double T, double dt, double sigma, field_type ft) { double tshift = (ft == E_stuff || ft == D_stuff) ? 0.0 : dt; T += 5 * dt; // allocate a few extra timesteps just in case int N = int(ceil(T / dt)); C *g = new C[N]; for (int i = 1; i < N; ++i) { double t = i * dt + tshift; g[i] = C(0,1.0)/(1.0*pi) * 0.5 * (2.0/(t*t*t) + 3.0*sigma/(2.0*t*t) + sigma*sigma/(2.0*t)); } return g; } } // namespace meep meep-1.3/src/boundaries.cpp0000644000175400001440000004772012506540456012673 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include "meep.hpp" #include "meep_internals.hpp" #define UNUSED(x) (void) x // silence compiler warnings using namespace std; namespace meep { void fields::set_boundary(boundary_side b,direction d,boundary_condition cond){ if (boundaries[b][d] != cond) { boundaries[b][d] = cond; chunk_connections_valid = false; } } void fields::use_bloch(direction d, complex kk) { k[d] = kk; for (int b=0;b<2;b++) set_boundary(boundary_side(b), d, Periodic); if (real(kk) * gv.num_direction(d) == 0.5 * a) // check b.z. edge exactly eikna[d] = -exp(-imag(kk) * ((2*pi/a)*gv.num_direction(d))); else { const complex I = complex(0.0,1.0); eikna[d] = exp(I*kk*((2*pi/a)*gv.num_direction(d))); } coskna[d] = real(eikna[d]); sinkna[d] = imag(eikna[d]); if (is_real && kk != 0.0) // FIXME: allow real phases (c.f. CONNECT_PHASE) abort("Can't use real fields with bloch boundary conditions!\n"); chunk_connections_valid = false; // FIXME: we don't always need to invalidate } void fields::use_bloch(const vec &k) { // Note that I allow a 1D k input when in cylindrical, since in that case // it is unambiguous. if (k.dim != gv.dim && !(k.dim == D1 && gv.dim == Dcyl)) abort("Aaaack, k has wrong dimensions!\n"); LOOP_OVER_DIRECTIONS(gv.dim, d) if (gv.has_boundary(Low,d) && d != R) use_bloch(d, k.in_direction(d)); } ivec fields::ilattice_vector(direction d) const { switch (user_volume.dim) { case D1: return ivec(2*user_volume.nz()); case Dcyl: return iveccyl(0,2*user_volume.nz()); // Only Z direction here case D2: switch (d) { case X: return ivec(user_volume.nx()*2,0); case Y: return ivec(0,user_volume.ny()*2); case Z: case R: case P: case NO_DIRECTION: break; } case D3: switch (d) { case X: return ivec(user_volume.nx()*2,0,0); case Y: return ivec(0,user_volume.ny()*2,0); case Z: return ivec(0,0,user_volume.nz()*2); case R: case P: case NO_DIRECTION: break; } } abort("Aaack in ilattice_vector.\n"); return ivec(0); } vec fields::lattice_vector(direction d) const { return gv[ilattice_vector(d)]; } void fields::disconnect_chunks() { chunk_connections_valid = false; for (int i=0;iconnections[f][ip][io]; chunks[i]->connections[f][ip][io] = NULL; } } FOR_FIELD_TYPES(f) { delete[] chunks[i]->connection_phases[f]; chunks[i]->connection_phases[f] = NULL; for (int ip=0;ip<3;++ip) for (int io=0;io<2;io++) chunks[i]->num_connections[f][ip][io] = 0; } } FOR_FIELD_TYPES(ft) for (int i=0;i *phase) const { // Check if a translational symmetry is needed to bring the point in... if (!user_volume.owns(*there)) FOR_DIRECTIONS(d) { if (boundaries[High][d] == Periodic && there->in_direction(d) <= user_volume.little_corner().in_direction(d)) { while (there->in_direction(d) <= user_volume.little_corner().in_direction(d)) { *there += ilattice_vector(d); *phase *= conj(eikna[d]); } } else if (boundaries[High][d] == Periodic && there->in_direction(d)-ilattice_vector(d).in_direction(d) > user_volume.little_corner().in_direction(d)) { while (there->in_direction(d)-ilattice_vector(d).in_direction(d) > user_volume.little_corner().in_direction(d)) { *there -= ilattice_vector(d); *phase *= eikna[d]; } } } return user_volume.owns(*there); } void fields::locate_volume_source_in_user_volume(const vec p1, const vec p2, vec newp1[8], vec newp2[8], complex kphase[8], int &ncopies) const { // For periodic boundary conditions, // this function locates up to 8 translated copies of the initial grid_volume specified by (p1,p2) // First bring center of grid_volume inside ncopies = 1; newp1[0] = p1; newp2[0] = p2; kphase[0] = 1; vec cen = (newp1[0] + newp2[0]) * 0.5; LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic) { while (cen.in_direction(d) < gv.boundary_location(Low, d)) { newp1[0] += lattice_vector(d); newp2[0] += lattice_vector(d); kphase[0] *= conj(eikna[d]); cen = (newp1[0] + newp2[0]) * 0.5; } while (cen.in_direction(d) > gv.boundary_location(High, d)) { newp1[0] -= lattice_vector(d); newp2[0] -= lattice_vector(d); kphase[0] *= eikna[d]; cen = (newp1[0] + newp2[0]) * 0.5; } } // if grid_volume extends outside user_volume in any direction, we need to duplicate already existing copies LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic) { if (newp1[0].in_direction(d) < gv.boundary_location(Low, d) || newp2[0].in_direction(d) < gv.boundary_location(Low, d)) { for (int j=0; j gv.boundary_location(High, d) || newp2[0].in_direction(d) > gv.boundary_location(High, d)) { for (int j=0; j *phase) const { // returns true if this point and component exist in the user_volume. If // that is the case, on return *c and *there store the component and // location of where the point actually is, and *phase determines holds // the phase needed to get the true field. If the point is not located, // *c and *there will hold undefined values. // Check if nothing tricky is needed... *phase = 1.0; if (!locate_point_in_user_volume(there, phase)) return false; // Check if a rotation or inversion brings the point in... if (user_volume.owns(*there)) for (int sn=0;snis_mine()) { const grid_volume vi = chunks[i]->gv; FOR_FIELD_TYPES(ft) { delete[] chunks[i]->zeroes[ft]; // First electric components... chunks[i]->num_zeroes[ft] = 0; DOCMP FOR_COMPONENTS(c) if (type(c) == ft && chunks[i]->f[c][cmp]) LOOP_OVER_VOL_OWNED(vi, c, n) if (IVEC_LOOP_AT_BOUNDARY) { // todo: just loop over boundaries IVEC_LOOP_ILOC(vi, here); if (on_metal_boundary(here)) chunks[i]->num_zeroes[ft]++; } typedef realnum *realnum_ptr; chunks[i]->zeroes[ft] = new realnum_ptr[chunks[i]->num_zeroes[ft]]; int num = 0; DOCMP FOR_COMPONENTS(c) if (type(c) == ft && chunks[i]->f[c][cmp]) LOOP_OVER_VOL_OWNED(vi, c, n) if (IVEC_LOOP_AT_BOUNDARY) { // todo: just loop over boundaries IVEC_LOOP_ILOC(vi, here); if (on_metal_boundary(here)) chunks[i]->zeroes[ft][num++] = chunks[i]->f[c][cmp] + n; } } } } bool fields_chunk::needs_W_notowned(component c) { for (susceptibility *chiP = s->chiP[type(c)]; chiP; chiP = chiP->next) if (chiP->needs_W_notowned(c, f)) return true; return false; } void fields::connect_the_chunks() { int *nc[NUM_FIELD_TYPES][3][2]; FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) { nc[f][ip][io] = new int[num_chunks]; for (int i=0;if[hc][0] == chunks[i]->f[bc][0]; and_to_all(B_redundant + 5*num_chunks, B_redundant, 5*num_chunks); /* Figure out whether we need the notowned W field (== E/H in non-PML regions) in update_pols, e.g. if we have an anisotropic susceptibility. In this case, we have an additional communication step where we communicate the notowned W. Then, after updating the polarizations, we communicate the notowned E/H ... this does the E/H communication twice between non-PML regions and hence is somewhat wasteful, but greatly simplifies the case of communicating between a PML region (which has a separate W array) and a non-PML region (no separate W). */ bool needs_W_notowned[NUM_FIELD_COMPONENTS]; FOR_COMPONENTS(c) needs_W_notowned[c] = false; FOR_E_AND_H(c) for (int i=0;ineeds_W_notowned(c); FOR_E_AND_H(c) needs_W_notowned[c] = or_to_all(needs_W_notowned[c]); for (int i=0;igv; FOR_FIELD_TYPES(ft) for (int ip=0;ip<3;ip++) for (int j=0;j thephase; if (locate_component_point(&c,&here,&thephase) && !on_metal_boundary(here)) for (int j=0;jis_mine() || chunks[j]->is_mine()) && chunks[j]->gv.owns(here) && !(is_B(corig) && is_B(c) && B_redundant[5*i+corig-Bx] && B_redundant[5*j+c-Bx])) { const int pair = j+i*num_chunks; const connect_phase ip = thephase == 1.0 ? CONNECT_COPY : (thephase == -1.0 ? CONNECT_NEGATE : CONNECT_PHASE); { field_type f = type(c); const int nn = is_real?1:2; nc[f][ip][Incoming][i] += nn; nc[f][ip][Outgoing][j] += nn; comm_sizes[f][ip][pair] += nn; } if (needs_W_notowned[corig]) { field_type f = is_electric(corig) ? WE_stuff : WH_stuff; const int nn = is_real?1:2; nc[f][ip][Incoming][i] += nn; nc[f][ip][Outgoing][j] += nn; comm_sizes[f][ip][pair] += nn; } if (is_electric(corig) || is_magnetic(corig)) { field_type f = is_electric(corig) ? PE_stuff : PH_stuff; int ni = 0, cni = 0; for (polarization_state *pi=chunks[i]->pol[type(corig)]; pi; pi = pi->next) for (polarization_state *pj=chunks[j]->pol[type(c)]; pj; pj = pj->next) if (*pi->s == *pj->s) { if (pi->data && chunks[i]->is_mine()) { ni += pi->s->num_internal_notowned_needed(corig, pi->data); cni += pi->s->num_cinternal_notowned_needed(corig, pi->data); } else if (pj->data && chunks[j]->is_mine()) { ni += pj->s->num_internal_notowned_needed(c, pj->data); cni += pj->s->num_cinternal_notowned_needed(c, pj->data); } } const int nn = (is_real?1:2) * (cni); nc[f][ip][Incoming][i] += nn; nc[f][ip][Outgoing][j] += nn; comm_sizes[f][ip][pair] += nn; const connect_phase iip = CONNECT_COPY; nc[f][iip][Incoming][i] += ni; nc[f][iip][Outgoing][j] += ni; comm_sizes[f][iip][pair] += ni; } } // if is_mine and owns... } // loop over j chunks } // LOOP_OVER_VOL_NOTOWNED } // FOR_COMPONENTS // Allocating comm blocks as we go... FOR_FIELD_TYPES(ft) for (int j=0;jalloc_extra_connections(field_type(f), connect_phase(ip), in_or_out(io), nc[f][ip][io][i]); delete[] nc[f][ip][io]; wh[f][ip][io] = new int[num_chunks]; } for (int i=0;igv; // initialize wh[f][ip][Incoming][j] to sum of comm_sizes for jj < j FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) { wh[f][ip][Incoming][0] = 0; for (int j = 1; j < num_chunks; ++j) wh[f][ip][Incoming][j] = wh[f][ip][Incoming][j-1] + comm_sizes[f][ip][(j-1)+i*num_chunks]; } FOR_COMPONENTS(corig) if (have_component(corig)) LOOP_OVER_VOL_NOTOWNED(vi, corig, n) { IVEC_LOOP_ILOC(vi, here); component c = corig; // We're looking at a border element... complex thephase; if (locate_component_point(&c,&here,&thephase) && !on_metal_boundary(here)) for (int j=0;jis_mine() || chunks[j]->is_mine()) && chunks[j]->gv.owns(here) && !(is_B(corig) && is_B(c) && B_redundant[5*i+corig-Bx] && B_redundant[5*j+c-Bx])) { const connect_phase ip = thephase == 1.0 ? CONNECT_COPY : (thephase == -1.0 ? CONNECT_NEGATE : CONNECT_PHASE); const int m = chunks[j]->gv.index(c, here); { field_type f = type(c); if (ip == CONNECT_PHASE) chunks[i]->connection_phases[f][wh[f][ip][Incoming][j]/2] = thephase; DOCMP { chunks[i]->connections[f][ip][Incoming] [wh[f][ip][Incoming][j]++] = chunks[i]->f[corig][cmp] + n; chunks[j]->connections[f][ip][Outgoing] [wh[f][ip][Outgoing][j]++] = chunks[j]->f[c][cmp] + m; } } if (needs_W_notowned[corig]) { field_type f = is_electric(corig) ? WE_stuff : WH_stuff; if (ip == CONNECT_PHASE) chunks[i]->connection_phases[f][wh[f][ip][Incoming][j]/2] = thephase; DOCMP { chunks[i]->connections[f][ip][Incoming] [wh[f][ip][Incoming][j]++] = (chunks[i]->f_w[corig][cmp] ? chunks[i]->f_w[corig][cmp] : chunks[i]->f[corig][cmp]) + n; chunks[j]->connections[f][ip][Outgoing] [wh[f][ip][Outgoing][j]++] = (chunks[j]->f_w[c][cmp] ? chunks[j]->f_w[c][cmp] : chunks[j]->f[c][cmp]) + m; } } if (is_electric(corig) || is_magnetic(corig)) { field_type f = is_electric(corig) ? PE_stuff : PH_stuff; for (polarization_state *pi=chunks[i]->pol[type(corig)]; pi; pi = pi->next) for (polarization_state *pj=chunks[j]->pol[type(c)]; pj; pj = pj->next) if (*pi->s == *pj->s) { polarization_state *po = NULL; if (pi->data && chunks[i]->is_mine()) po = pi; else if (pj->data && chunks[j]->is_mine()) po = pj; if (po) { const connect_phase iip = CONNECT_COPY; const int ni = po->s-> num_internal_notowned_needed(corig, po->data); for (int k = 0; k < ni; ++k) { chunks[i]->connections[f][iip][Incoming] [wh[f][iip][Incoming][j]++] = po->s->internal_notowned_ptr(k, corig, n, pi->data); chunks[j]->connections[f][iip][Outgoing] [wh[f][iip][Outgoing][j]++] = po->s->internal_notowned_ptr(k, c, m, pj->data); } const int cni = po->s-> num_cinternal_notowned_needed(corig, po->data); for (int k = 0; k < cni; ++k) { if (ip == CONNECT_PHASE) chunks[i]->connection_phases[f] [wh[f][ip][Incoming][j]/2] = thephase; DOCMP { chunks[i]->connections[f][ip][Incoming] [wh[f][ip][Incoming][j]++] = po->s->cinternal_notowned_ptr(k, corig,cmp, n, pi->data); chunks[j]->connections[f][ip][Outgoing] [wh[f][ip][Outgoing][j]++] = po->s->cinternal_notowned_ptr(k, c,cmp, m, pj->data); } } } } } // is_electric(corig) } // if is_mine and owns... } // loop over j chunks } // LOOP_OVER_VOL_NOTOWNED } // loop over i chunks FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) delete[] wh[f][ip][io]; delete[] B_redundant; } void fields_chunk::alloc_extra_connections(field_type f, connect_phase ip, in_or_out io, int num) { if (num == 0) return; // No need to go to any bother... const int tot = num_connections[f][ip][io] + num; if (io == Incoming && ip == CONNECT_PHASE) { delete[] connection_phases[f]; connection_phases[f] = new complex[tot]; } typedef realnum *realnum_ptr; realnum **conn = new realnum_ptr[tot]; if (!conn) abort("Out of memory!\n"); delete[] connections[f][ip][io]; connections[f][ip][io] = conn; num_connections[f][ip][io] = tot; } } // namespace meep meep-1.3/src/step_db.cpp0000644000175400001440000003766112506540456012163 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #define RESTRICT using namespace std; namespace meep { void fields::step_db(field_type ft) { for (int i=0;iis_mine()) if (chunks[i]->step_db(ft)) chunk_connections_valid = false; /* synchronize to avoid deadlocks in connect_the_chunks */ chunk_connections_valid = and_to_all(chunk_connections_valid); } bool fields_chunk::step_db(field_type ft) { bool allocated_u = false; if (ft != B_stuff && ft != D_stuff) abort("bug - step_db should only be called for B or D"); DOCMP FOR_FT_COMPONENTS(ft, cc) if (f[cc][cmp]) { const component c_p=plus_component[cc], c_m=minus_component[cc]; const direction d_deriv_p = plus_deriv_direction[cc]; const direction d_deriv_m = minus_deriv_direction[cc]; const direction d_c = component_direction(cc); const bool have_p = have_plus_deriv[cc]; const bool have_m = have_minus_deriv[cc]; const direction dsig0 = cycle_direction(gv.dim,d_c,1); const direction dsig = s->sigsize[dsig0] > 1 ? dsig0 : NO_DIRECTION; const direction dsigu0 = cycle_direction(gv.dim,d_c,2); const direction dsigu = s->sigsize[dsigu0] > 1 ? dsigu0 : NO_DIRECTION; int stride_p = have_p?gv.stride(d_deriv_p):0; int stride_m = have_m?gv.stride(d_deriv_m):0; realnum *f_p = have_p?f[c_p][cmp]:NULL; realnum *f_m = have_m?f[c_m][cmp]:NULL; realnum *the_f = f[cc][cmp]; if (dsig != NO_DIRECTION && s->conductivity[cc][d_c] && !f_cond[cc][cmp]) { f_cond[cc][cmp] = new realnum[gv.ntot()]; memset(f_cond[cc][cmp], 0, sizeof(realnum) * gv.ntot()); } if (dsigu != NO_DIRECTION && !f_u[cc][cmp]) { f_u[cc][cmp] = new realnum[gv.ntot()]; memcpy(f_u[cc][cmp], the_f, gv.ntot() * sizeof(realnum)); allocated_u = true; } if (ft == D_stuff) { // strides are opposite sign for H curl stride_p = -stride_p; stride_m = -stride_m; } if (gv.dim == Dcyl) switch (d_c) { case R: f_p = NULL; // im/r Fz term will be handled separately break; case P: break; // curl works normally for phi component case Z: { f_m = NULL; // im/r Fr term will be handled separately /* Here we do a somewhat cool hack: the update of the z component gives a 1/r d(r Fp)/dr term, rather than just the derivative dg/dr expected in step_curl. Rather than duplicating all of step_curl to handle this bloody derivative, however, we define a new array f_rderiv_int which is the integral of 1/r d(r Fp)/dr, so that we can pass it to the unmodified step_curl and get the correct derivative. (More precisely, the derivative and integral are replaced by differences and sums, but you get the idea). */ if (!f_rderiv_int) f_rderiv_int = new realnum[gv.ntot()]; double ir0 = gv.origin_r() * gv.a + 0.5 * gv.iyee_shift(c_p).in_direction(R); for (int iz = 0; iz <= gv.nz(); ++iz) f_rderiv_int[iz] = 0; int sr = gv.nz() + 1; for (int ir = 1; ir <= gv.nr(); ++ir) { double rinv = 1.0 / ((ir+ir0)-0.5); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; f_rderiv_int[idx] = f_rderiv_int[idx - sr] + rinv * (f_p[idx] * (ir+ir0) - f_p[idx - sr] * ((ir-1)+ir0)); } } f_p = f_rderiv_int; break; } default: abort("bug - non-cylindrical field component in Dcyl"); } STEP_CURL(the_f, cc, f_p, f_m, stride_p, stride_m, gv, Courant, dsig, s->sig[dsig], s->kap[dsig], s->siginv[dsig], f_u[cc][cmp], dsigu, s->sig[dsigu], s->kap[dsigu], s->siginv[dsigu], dt, s->conductivity[cc][d_c], s->condinv[cc][d_c],f_cond[cc][cmp]); } /* In 2d with beta != 0, add beta terms. This is a trick to model an exp(i beta z) z-dependence but without requiring a "3d" calculation and without requiring complex fields. Looking at the z=0 2d cross-section, the exp(i beta z) term adds an i \beta \hat{z} \times cross-product to the curls, which couples the TE and TM polarizations. However, to avoid complex fields, in the case of real fields we implicitly store i*(TM fields) rather than the TM fields, in which case the i's cancel in the update equations. (Mathematically, this is equivalent to looking at the superposition of the fields at beta and the timereversed fields at -beta.) The nice thing about this is that most calculations of flux, energy, etcetera, are insensitive to this implicit "i" factor. For complex fields, we implement i*beta directly. */ if (gv.dim == D2 && beta != 0) DOCMP for (direction d_c=X; d_c <= Y; d_c = direction(d_c + 1)) { component cc = direction_component(first_field_component(ft), d_c); component c_g = direction_component(ft == D_stuff ? Hx : Ex, d_c == X ? Y : X); realnum *the_f = f[cc][cmp]; const realnum *g = f[c_g][1-cmp] ? f[c_g][1-cmp] : f[c_g][cmp]; const direction dsig0 = cycle_direction(gv.dim,d_c,1); const direction dsig = s->sigsize[dsig0] > 1 ? dsig0 : NO_DIRECTION; const direction dsigu0 = cycle_direction(gv.dim,d_c,2); const direction dsigu = s->sigsize[dsigu0] > 1 ? dsigu0 : NO_DIRECTION; const double betadt = 2 * pi * beta * dt * (d_c == X ? +1 : -1) * (f[c_g][1-cmp] ? (ft == D_stuff ? -1 : +1) * (2*cmp-1) : 1); STEP_BETA(the_f, cc, g, gv, betadt, dsig, s->siginv[dsig], f_u[cc][cmp], dsigu, s->siginv[dsigu], s->condinv[cc][d_c], f_cond[cc][cmp]); } // in cylindrical coordinates, we now have to add the i*m/r terms... */ if (gv.dim == Dcyl && m != 0) DOCMP FOR_FT_COMPONENTS(ft, cc) { const direction d_c = component_direction(cc); if (f[cc][cmp] && (d_c == R || d_c == Z)) { const component c_g = d_c==R ? plus_component[cc] : minus_component[cc]; const realnum *g = f[c_g][1-cmp]; realnum *the_f = f[cc][cmp]; const realnum *cndinv = s->condinv[cc][d_c]; realnum *fcnd = f_cond[cc][cmp]; realnum *fu = f_u[cc][cmp]; const direction dsig = cycle_direction(gv.dim,d_c,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(cc).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,d_c,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(cc).in_direction(dsigu); const double the_m = m * (1-2*cmp) * (1-2*(ft==B_stuff)) * (1-2*(d_c==R)) * Courant; const double ir0 = gv.origin_r() * gv.a + 0.5 * gv.iyee_shift(cc).in_direction(R); int sr = gv.nz() + 1; // 8 special cases of the same loop (sigh): if (siginv) { // PML in f update if (siginvu) { // PML + fu if (cndinv) // PML + fu + conductivity //////////////////// MOST GENERAL CASE ////////////////////// for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); int ku = dku + 2*(dsigu==Z ? iz : ir); double df, dfcnd = rinv * g[idx] * cndinv[idx]; fcnd[idx] += dfcnd; fu[idx] += (df = dfcnd * siginv[k]); the_f[idx] += siginvu[ku] * df; } } ///////////////////////////////////////////////////////////// else // PML + fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); int ku = dku + 2*(dsigu==Z ? iz : ir); double df, dfcnd = rinv * g[idx]; fu[idx] += (df = dfcnd * siginv[k]); the_f[idx] += siginvu[ku] * df; } } } else { // PML - fu if (cndinv) // PML - fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); double dfcnd = rinv * g[idx] * cndinv[idx]; fcnd[idx] += dfcnd; the_f[idx] += dfcnd * siginv[k]; } } else // PML - fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); double dfcnd = rinv * g[idx]; the_f[idx] += dfcnd * siginv[k]; } } } } else { // no PML in f update if (siginvu) { // no PML + fu if (cndinv) // no PML + fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int ku = dku + 2*(dsigu==Z ? iz : ir); double df = rinv * g[idx] * cndinv[idx]; fu[idx] += df; the_f[idx] += siginvu[ku] * df; } } else // no PML + fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int ku = dku + 2*(dsigu==Z ? iz : ir); double df = rinv * g[idx]; fu[idx] += df; the_f[idx] += siginvu[ku] * df; } } } else { // no PML - fu if (cndinv) // no PML - fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; the_f[idx] += rinv * g[idx] * cndinv[idx]; } } else // no PML - fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; the_f[idx] += rinv * g[idx]; } } } } } } #define ZERO_Z(array) memset(array, 0, sizeof(realnum)*(nz+1)); // deal with annoying r=0 boundary conditions for m=0 and m=1 if (gv.dim == Dcyl && gv.origin_r() == 0.0) DOCMP { const int nz = gv.nz(); if (m == 0 && ft == D_stuff && f[Dz][cmp]) { // d(Dz)/dt = (1/r) * d(r*Hp)/dr const realnum *g = f[Hp][cmp]; const realnum *cndinv = s->condinv[Dz][Z]; realnum *fcnd = f_cond[Dz][cmp]; const direction dsig = cycle_direction(gv.dim,Z,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(Dz).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,Z,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(Dz).in_direction(dsigu); realnum *fu = siginvu && f_u[Dz][cmp] ? f[Dz][cmp] : 0; realnum *the_f = fu ? f_u[Dz][cmp] : f[Dz][cmp]; for (int iz = 0; iz < nz; ++iz) { // Note: old code (prior to Meep 0.2) was missing factor of 4?? double df, dfcnd = g[iz] * (Courant * 4) * (cndinv ? cndinv[iz] : 1); if (fcnd) fcnd[iz] += dfcnd; the_f[iz] += (df = dfcnd * (siginv ? siginv[dk + 2*(dsig==Z)*iz] : 1)); if (fu) fu[iz] += siginvu[dku + 2*(dsigu==Z)*iz] * df; } ZERO_Z(f[Dp][cmp]); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]); } else if (m == 0 && ft == B_stuff && f[Br][cmp]) { ZERO_Z(f[Br][cmp]); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]); } else if (fabs(m) == 1) { // D_stuff: d(Dp)/dt = d(Hr)/dz - d(Hz)/dr // B_stuff: d(Br)/dt = d(Ep)/dz - i*m*Ez/r component cc = ft == D_stuff ? Dp : Br; direction d_c = component_direction(cc); if (!f[cc][cmp]) continue; const realnum *f_p = f[ft == D_stuff ? Hr : Ep][cmp]; const realnum *f_m = ft == D_stuff ? f[Hz][cmp] : (f[Ez][1-cmp] + (nz+1)); const realnum *cndinv = s->condinv[cc][d_c]; realnum *fcnd = f_cond[cc][cmp]; const direction dsig = cycle_direction(gv.dim,d_c,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(cc).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,d_c,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(cc).in_direction(dsigu); realnum *fu = siginvu && f_u[cc][cmp] ? f[cc][cmp] : 0; realnum *the_f = fu ? f_u[cc][cmp] : f[cc][cmp]; int sd = ft == D_stuff ? +1 : -1; double f_m_mult = ft == D_stuff ? 2 : (1-2*cmp); for (int iz = (ft == D_stuff); iz < nz + (ft == D_stuff); ++iz) { double df; double dfcnd = (sd*Courant) * (f_p[iz]-f_p[iz-sd] - f_m_mult*f_m[iz]) * (cndinv ? cndinv[iz] : 1); if (fcnd) fcnd[iz] += dfcnd; the_f[iz] += (df = dfcnd * (siginv ? siginv[dk + 2*(dsig==Z)*iz] : 1)); if (fu) fu[iz] += siginvu[dku + 2*(dsigu==Z)*iz] * df; } if (ft == D_stuff) { ZERO_Z(f[Dz][cmp]); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]); } } else if (m != 0) { // m != {0,+1,-1} if (zero_fields_near_cylorigin) { /* default behavior */ /* I seem to recall David telling me that this was for numerical stability of some sort - the larger m is, the farther from the origin we need to be before we can use nonzero fields ... note that this is a fixed number of pixels for a given m, so it should still converge. Still, this is weird... Update: experimentally, this seems to indeed be important for stability. Setting these fields to zero, it seems to be stable with a Courant number < 0.62 or so for all m. Without this, it becomes unstable unless we set the Courant number to about 1 / (|m| + 0.5) or less. Cons: setting fields near the origin to identically zero is somewhat unexpected for users, and probably spoils 2nd-order accuracy, and may not fix all stability issues anyway (based on anecdotal evidence from Alex M. of having to reduce Courant for large m). */ double rmax = fabs(m) - int(gv.origin_r()*gv.a+0.5); if (ft == D_stuff) for (int r = 0; r <= gv.nr() && r < rmax; r++) { const int ir = r*(nz+1); ZERO_Z(f[Dp][cmp]+ir); ZERO_Z(f[Dz][cmp]+ir); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]+ir); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]+ir); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]+ir); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]+ir); } else for (int r = 0; r <= gv.nr() && r < rmax; r++) { const int ir = r*(nz+1); ZERO_Z(f[Br][cmp]+ir); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]+ir); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]+ir); } } else { /* Without David's hack: just set boundary conditions at r=0. This seems to be unstable unless we make the Courant number around 1 / (|m| + 0.5) or smaller. Pros: probably maintains 2nd-order accuracy, is more sane for r near zero. Cons: 1/(|m|+0.5) is purely empirical (no theory yet), and I'm not sure how universal it is. Makes higher m's more expensive. */ if (ft == D_stuff) { ZERO_Z(f[Dp][cmp]); ZERO_Z(f[Dz][cmp]); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]); } else { ZERO_Z(f[Br][cmp]); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]); } } } } return allocated_u; } } // namespace meep meep-1.3/src/control_c.cpp0000644000175400001440000000275512506540456012521 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" using namespace std; namespace meep { int interrupt = 0; static int kill_time = 2; static void handle_control_c(int i) { (void) i; // unused: should equal SIGINT interrupt++; if (interrupt >= kill_time) { abort("interrupted"); } else if (interrupt + 1 == kill_time) { printf("Be patient... hit ctrl-C one more time to kill me.\n"); } else { printf("Be patient... hit ctrl-C %d more times to kill me.\n", kill_time - interrupt); } } void deal_with_ctrl_c(int stop_now) { kill_time = stop_now; if (signal(SIGINT, handle_control_c) == SIG_IGN) signal(SIGINT, SIG_IGN); // ignore if parent process was ignoring } } // namespace meep meep-1.3/src/cw_fields.cpp0000644000175400001440000001615012506540456012470 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep_internals.hpp" #include "bicgstab.hpp" using namespace std; namespace meep { static void fields_to_array(const fields &f, complex *x) { int ix = 0; for (int i=0;iis_mine()) FOR_COMPONENTS(c) if (is_D(c) || is_B(c)) { realnum *fr, *fi; #define COPY_FROM_FIELD(fld) \ if ((fr = f.chunks[i]->fld[0]) && \ (fi = f.chunks[i]->fld[1])) \ LOOP_OVER_VOL_OWNED(f.chunks[i]->gv, c, idx) \ x[ix++] = complex(fr[idx], fi[idx]); COPY_FROM_FIELD(f[c]); COPY_FROM_FIELD(f_u[c]); COPY_FROM_FIELD(f_cond[c]); component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); COPY_FROM_FIELD(f_w[c2]); if (f.chunks[i]->f_w[c2][0]) COPY_FROM_FIELD(f[c2]); #undef COPY_FROM_FIELD } } static void array_to_fields(const complex *x, fields &f) { int ix = 0; for (int i=0;iis_mine()) FOR_COMPONENTS(c) if (is_D(c) || is_B(c)) { realnum *fr, *fi; #define COPY_TO_FIELD(fld) \ if ((fr = f.chunks[i]->fld[0]) && \ (fi = f.chunks[i]->fld[1])) \ LOOP_OVER_VOL_OWNED(f.chunks[i]->gv, c, idx) { \ fr[idx] = real(x[ix]); \ fi[idx] = imag(x[ix++]); \ } COPY_TO_FIELD(f[c]); COPY_TO_FIELD(f_u[c]); COPY_TO_FIELD(f_cond[c]); component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); COPY_TO_FIELD(f_w[c2]); if (f.chunks[i]->f_w[c2][0]) COPY_TO_FIELD(f[c2]); #undef COPY_TO_FIELD } f.step_boundaries(D_stuff); f.update_eh(E_stuff, true); f.step_boundaries(E_stuff); /* done in f.step before updating D: f.step_boundaries(B_stuff); f.update_eh(H_stuff); f.step_boundaries(H_stuff); */ } typedef struct { int n; fields *f; complex iomega; int iters; } fieldop_data; static void fieldop(const realnum *xr, realnum *yr, void *data_) { const complex *x = reinterpret_cast*>(xr); complex *y = reinterpret_cast*>(yr); fieldop_data *data = (fieldop_data *) data_; array_to_fields(x, *data->f); data->f->step(); fields_to_array(*data->f, y); int n = data->n; realnum dt_inv = 1.0 / data->f->dt; complex iomega = complex(real(data->iomega), imag(data->iomega)); for (int i = 0; i < n; ++i) y[i] = (y[i] - x[i]) * dt_inv + iomega * x[i]; data->iters++; } /* Solve for the CW (constant frequency) field response at the given frequency to the sources (with amplitude given by the current sources at the current time). The solver halts at a fractional convergence of tol, or when maxiters is reached, or when convergence fails; returns true if convergence succeeds and false if it fails. The parameter L determines the order of the iterative algorithm that is used. L should always be positive and should normally be >= 2. Larger values of L will often lead to faster convergence, at the expense of more memory and more work per iteration. */ bool fields::solve_cw(double tol, int maxiters, complex frequency, int L) { if (is_real) abort("solve_cw is incompatible with use_real_fields()"); if (L < 1) abort("solve_cw called with L = %d < 1", L); int tsave = t; // save time (gets incremented by iterations) set_solve_cw_omega(2*pi*frequency); step(); // step once to make sure everything is allocated int N = 0; // size of linear system (on this processor, at least) for (int i=0;iis_mine()) { FOR_COMPONENTS(c) if (chunks[i]->f[c][0] && (is_D(c) || is_B(c))) { component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); /* unknowns are just D and B in non-PML regions, but in PML regions the E, U, W, and C fields are also unknowns (in principle, we might be able to compute these extra fields in frequency domain via scalinb by the appropriate s factors, rather than storing them, but I had some problems getting that working) */ N += 2 * chunks[i]->gv.nowned(c) * (1 + (chunks[i]->f_u[c][0] != NULL) + (chunks[i]->f_w[c2][0] != NULL) * 2 + (chunks[i]->f_cond[c][0] != NULL)); } } int nwork = bicgstabL(L, N, 0, 0, 0, 0, tol, &maxiters, 0, true); realnum *work = new realnum[nwork + 2*N]; complex *x = reinterpret_cast*>(work + nwork); complex *b = reinterpret_cast*>(work + nwork + N); fields_to_array(*this, x); // initial guess = initial fields // get J amplitudes from current time step zero_fields(); // note that we've saved the fields in x above calc_sources(time()); step_source(B_stuff, true); step_boundaries(B_stuff); update_eh(H_stuff); calc_sources(time() + 0.5*dt); step_source(D_stuff, true); step_boundaries(D_stuff); update_eh(E_stuff); fields_to_array(*this, b); double mdt_inv = -1.0 / dt; for (int i = 0; i < N/2; ++i) b[i] *= mdt_inv; { double bmax = 0; for (int i = 0; i < N/2; ++i) { double babs = abs(b[i]); if (babs > bmax) bmax = babs; } if (max_to_all(bmax) == 0.0) abort("zero current amplitudes in solve_cw"); } fieldop_data data; data.f = this; data.n = N / 2; data.iomega = ((1.0 - exp(complex(0.,-1.) * (2*pi*frequency) * dt)) * (1.0 / dt)); data.iters = 0; int ierr = bicgstabL(L, N, reinterpret_cast(x), fieldop, &data, reinterpret_cast(b), tol, &maxiters, work, quiet); if (!quiet) { master_printf("Finished solve_cw after %d steps and %d CG iters.\n", data.iters, maxiters); if (ierr) master_printf(" -- CONVERGENCE FAILURE (%d) in solve_cw!\n", ierr); } array_to_fields(x, *this); step(); // ensure H/B are updated and synced with E/D delete[] work; t = tsave; unset_solve_cw_omega(); return !ierr; } /* as solve_cw, but infers frequency from sources */ bool fields::solve_cw(double tol, int maxiters, int L) { complex freq = 0.0; for (src_time *s = sources; s; s = s->next) { complex sf = s->frequency(); if (sf != freq && freq != 0.0 && sf != 0.0) abort("must pass frequency to solve_cw if sources do not agree"); if (sf != 0.0) freq = sf; } if (freq == 0.0) abort("must pass frequency to solve_cw if sources do not specify one"); return solve_cw(tol, maxiters, freq, L); } } // namespace meep meep-1.3/src/bicgstab.cpp0000644000175400001440000001601612506540456012310 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "meep/mympi.hpp" #include "bicgstab.hpp" #include "config.h" /* bicgstab() implements an iterative solver for non-symmetric linear operators, using the algorithm described in: Gerard L. G. Sleijpen and Diederik R. Fokkema, "BiCGSTAB(L) for linear equations involving unsymmetric matrices with complex spectrum," Electronic Trans. on Numerical Analysis 1, 11-32 (1993). and also: Gerard L.G. Sleijpen, Henk A. van der Vorst, and Diederik R. Fokkema, " BiCGstab(L) and other Hybrid Bi-CG Methods," Numerical Algorithms 7, 75-109 (1994). This is a generalization of the stabilized biconjugate-gradient (BiCGSTAB) algorithm proposed by van der Vorst (and described in the book _Templates for the Solution of Linear Systems_ by Barrett et al.) BiCGSTAB(1) is equivalent to BiCGSTAB, and BiCGSTAB(2) is a slightly more efficient version of the BiCGSTAB2 algorithm by Gutknecht, while BiCGSTAB(L>2) is a further generalization. The reason that we use this generalization of BiCGSTAB is that the BiCGSTAB(1) algorithm was observed by Sleijpen and Fokkema to have poor (or even failing) convergence when the linear operator has near-pure imaginary eigenvalues. This is precisely the case for our problem (the eigenvalues of the timestep operator are i*omega), and we observed precisely such stagnation of convergence. The BiCGSTAB(2) algorithm was reported to fix most such convergence problems, and indeed L > 1 seems to converge well for us. */ /* Other variations to explore: G. L. G. Sleijpen and H. A. van der Vorst, "Reliable updated residuals in hybrid Bi-CG methods," Computing 56 (2), 141-163 (1996). G. L. G. Sleijpen and H. A. van der Vorst, "Maintaining convergence properties of BiCGstab methods in finite precision arithmetic," Numerical Algorithms 10, 203-223 (1995). See also code on Sleijpen's web page: http://www.math.uu.nl/people/sleijpen/ */ using namespace std; namespace meep { static double dot(int n, const realnum *x, const realnum *y) { double sum = 0; for (int i = 0; i < n; ++i) sum += x[i] * y[i]; return sum_to_all(sum); } static double norm2(int n, const realnum *x) { // note: we don't just do sqrt(dot(n, x, x)) in order to avoid overflow int i; double xmax = 0, scale; long double sum = 0; for (i = 0; i < n; ++i) { double xabs = fabs(x[i]); if (xabs > xmax) xmax = xabs; } xmax = max_to_all(xmax); if (xmax == 0) return 0; scale = 1.0 / xmax; for (i = 0; i < n; ++i) { double xs = scale * x[i]; sum += xs * xs; } return xmax * sqrt(sum_to_all(sum)); } static void xpay(int n, realnum *x, double a, const realnum *y) { for (int m = 0; m < n; ++m) x[m] += a * y[m]; } #define MIN_OUTPUT_TIME 4.0 // output no more often than this many seconds typedef realnum *prealnum; // grr, ISO C++ forbids new (double*)[...] /* BiCGSTAB(L) algorithm for the n-by-n problem Ax = b */ int bicgstabL(const int L, const int n, realnum *x, bicgstab_op A, void *Adata, const realnum *b, const double tol, int *iters, realnum *work, const bool quiet) { if (!work) return (2*L+3)*n; // required workspace prealnum *r = new prealnum[L+1]; prealnum *u = new prealnum[L+1]; for (int i = 0; i <= L; ++i) { r[i] = work + i * n; u[i] = work + (L+1 + i) * n; } double bnrm = norm2(n, b); if (bnrm == 0.0) bnrm = 1.0; int iter = 0; double last_output_wall_time = wall_time(); double *gamma = new double[L + 1]; double *gamma_p = new double[L + 1]; double *gamma_pp = new double[L + 1]; double *tau = new double[L * L]; double *sigma = new double[L + 1]; int ierr = 0; // error code to return, if any const double breaktol = 1e-30; /**** FIXME: check for breakdown conditions(?) during iteration ****/ // rtilde = r[0] = b - Ax realnum *rtilde = work + (2*L+2) * n; A(x, r[0], Adata); for (int m = 0; m < n; ++m) rtilde[m] = r[0][m] = b[m] - r[0][m]; { /* Sleipjen normalizes rtilde in his code; it seems to help slightly */ double s = 1.0 / norm2(n, rtilde); for (int m = 0; m < n; ++m) rtilde[m] *= s; } memset(u[0], 0, sizeof(realnum) * n); // u[0] = 0 double rho = 1.0, alpha = 0, omega = 1; double resid; while ((resid = norm2(n, r[0])) > tol * bnrm) { ++iter; if (!quiet && wall_time() > last_output_wall_time + MIN_OUTPUT_TIME) { master_printf("residual[%d] = %g\n", iter, resid / bnrm); last_output_wall_time = wall_time(); } rho = -omega * rho; for (int j = 0; j < L; ++j) { if (fabs(rho) < breaktol) { ierr = -1; goto finish; } double rho1 = dot(n, r[j], rtilde); double beta = alpha * rho1 / rho; rho = rho1; for (int i = 0; i <= j; ++i) for (int m = 0; m < n; ++m) u[i][m] = r[i][m] - beta * u[i][m]; A(u[j], u[j+1], Adata); alpha = rho / dot(n, u[j+1], rtilde); for (int i = 0; i <= j; ++i) xpay(n, r[i], -alpha, u[i+1]); A(r[j], r[j+1], Adata); xpay(n, x, alpha, u[0]); } for (int j = 1; j <= L; ++j) { for (int i = 1; i < j; ++i) { int ij = (j-1)*L + (i-1); tau[ij] = dot(n, r[j], r[i]) / sigma[i]; xpay(n, r[j], -tau[ij], r[i]); } sigma[j] = dot(n, r[j],r[j]); gamma_p[j] = dot(n, r[0], r[j]) / sigma[j]; } omega = gamma[L] = gamma_p[L]; for (int j = L-1; j >= 1; --j) { gamma[j] = gamma_p[j]; for (int i = j+1; i <= L; ++i) gamma[j] -= tau[(i-1)*L + (j-1)] * gamma[i]; } for (int j = 1; j < L; ++j) { gamma_pp[j] = gamma[j+1]; for (int i = j+1; i < L; ++i) gamma_pp[j] += tau[(i-1)*L + (j-1)] * gamma[i+1]; } xpay(n, x, gamma[1], r[0]); xpay(n, r[0], -gamma_p[L], r[L]); xpay(n, u[0], -gamma[L], u[L]); for (int j = 1; j < L; ++j) { /* TODO: use blas DGEMV (for L > 2) */ xpay(n, x, gamma_pp[j], r[j]); xpay(n, r[0], -gamma_p[j], r[j]); xpay(n, u[0], -gamma[j], u[j]); } if (iter == *iters) { ierr = 1; break; } } if (!quiet) master_printf("final residual = %g\n", norm2(n, r[0]) / bnrm); finish: delete[] sigma; delete[] tau; delete[] gamma_pp; delete[] gamma_p; delete[] gamma; delete[] u; delete[] r; *iters = iter; return ierr; } } // namespace meep meep-1.3/src/mympi.cpp0000644000175400001440000003601412506540456011665 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "config.h" #ifdef HAVE_MPI # ifdef NEED_UNDEF_SEEK_FOR_MPI // undef'ing SEEK_* is needed for MPICH, possibly other MPI versions # undef SEEK_SET # undef SEEK_END # undef SEEK_CUR # endif # include #endif #ifdef IGNORE_SIGFPE # include #endif #if defined(DEBUG) && defined(HAVE_FEENABLEEXCEPT) # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include # if !HAVE_DECL_FEENABLEEXCEPT extern "C" int feenableexcept (int EXCEPTS); # endif #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_BSDGETTIMEOFDAY # ifndef HAVE_GETTIMEOFDAY # define gettimeofday BSDgettimeofday # define HAVE_GETTIMEOFDAY 1 # endif #endif #define UNUSED(x) (void) x // silence compiler warnings #define MPI_REALNUM (sizeof(realnum) == sizeof(double) ? MPI_DOUBLE:MPI_FLOAT) using namespace std; namespace meep { #ifdef HAVE_MPI static MPI_Comm mycomm = MPI_COMM_WORLD; #endif bool quiet = false; // defined in meep.h initialize::initialize(int &argc, char** &argv) { #ifdef HAVE_MPI MPI_Init(&argc, &argv); int major, minor; MPI_Get_version(&major, &minor); if (!quiet) master_printf("Using MPI version %d.%d, %d processes\n", major, minor, count_processors()); #else UNUSED(argc); UNUSED(argv); #endif #if defined(DEBUG_FP) && defined(HAVE_FEENABLEEXCEPT) feenableexcept(FE_INVALID | FE_OVERFLOW); //crash if NaN created, or overflow #endif #ifdef IGNORE_SIGFPE signal(SIGFPE, SIG_IGN); #endif t_start = wall_time(); } initialize::~initialize() { if (!quiet) master_printf("\nElapsed run time = %g s\n", elapsed_time()); #ifdef HAVE_MPI end_divide_parallel(); MPI_Finalize(); #endif } double wall_time(void) { #ifdef HAVE_MPI return MPI_Wtime(); #elif HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, 0); return(tv.tv_sec + tv.tv_usec * 1e-6); #else return (clock() * 1.0 / CLOCKS_PER_SECOND); #endif } void abort(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(stderr, "meep: "); vfprintf(stderr, fmt, ap); va_end(ap); if (fmt[strlen(fmt) - 1] != '\n') fputc('\n', stderr); // force newline #ifdef HAVE_MPI MPI_Abort(MPI_COMM_WORLD, 1); #endif exit(1); } void send(int from, int to, double *data, int size) { #ifdef HAVE_MPI if (from == to) return; if (size == 0) return; const int me = my_rank(); if (from == me) MPI_Send(data, size, MPI_DOUBLE, to, 1, mycomm); MPI_Status stat; if (to == me) MPI_Recv(data, size, MPI_DOUBLE, from, 1, mycomm, &stat); #else UNUSED(from); UNUSED(to); UNUSED(data); UNUSED(size); #endif } #if MEEP_SINGLE void broadcast(int from, realnum *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_FLOAT, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } #endif void broadcast(int from, double *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_DOUBLE, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, char *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_CHAR, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, complex *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, 2*size, MPI_DOUBLE, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, int *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_INT, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } complex broadcast(int from, complex data) { #ifdef HAVE_MPI MPI_Bcast(&data, 2, MPI_DOUBLE, from, mycomm); #else UNUSED(from); #endif return data; } double broadcast(int from, double data) { #ifdef HAVE_MPI MPI_Bcast(&data, 1, MPI_DOUBLE, from, mycomm); #else UNUSED(from); #endif return data; } int broadcast(int from, int data) { #ifdef HAVE_MPI MPI_Bcast(&data, 1, MPI_INT, from, mycomm); #else UNUSED(from); #endif return data; } bool broadcast(int from, bool b) { return broadcast(from, (int) b); } double max_to_master(double in) { double out = in; #ifdef HAVE_MPI MPI_Reduce(&in,&out,1,MPI_DOUBLE,MPI_MAX,0,mycomm); #endif return out; } double max_to_all(double in) { double out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_DOUBLE,MPI_MAX,mycomm); #endif return out; } int max_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_INT,MPI_MAX,mycomm); #endif return out; } ivec max_to_all(const ivec &pt) { int in[5], out[5]; for (int i=0; i<5; ++i) in[i] = out[i] = pt.in_direction(direction(i)); #ifdef HAVE_MPI MPI_Allreduce(&in,&out,5,MPI_INT,MPI_MAX,mycomm); #endif ivec ptout(pt.dim); for (int i=0; i<5; ++i) ptout.set_direction(direction(i), out[i]); return ptout; } double sum_to_master(double in) { double out = in; #ifdef HAVE_MPI MPI_Reduce(&in,&out,1,MPI_DOUBLE,MPI_SUM,0,mycomm); #endif return out; } double sum_to_all(double in) { double out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_DOUBLE,MPI_SUM,mycomm); #endif return out; } void sum_to_all(const double *in, double *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_DOUBLE,MPI_SUM,mycomm); #else memcpy(out, in, sizeof(double) * size); #endif } void sum_to_master(const double *in, double *out, int size) { #ifdef HAVE_MPI MPI_Reduce((void*) in, out, size, MPI_DOUBLE,MPI_SUM,0,mycomm); #else memcpy(out, in, sizeof(double) * size); #endif } void sum_to_all(const float *in, double *out, int size) { double *in2 = new double[size]; for (int i = 0; i < size; ++i) in2[i] = in[i]; sum_to_all(in2, out, size); delete[] in2; } void sum_to_all(const complex *in, complex *out, int size) { sum_to_all((const double*) in, (double*) out, 2*size); } void sum_to_all(const complex *in, complex *out, int size) { sum_to_all((const float*) in, (double*) out, 2*size); } void sum_to_master(const complex *in, complex *out, int size) { sum_to_master((const double*) in, (double*) out, 2*size); } long double sum_to_all(long double in) { long double out = in; #ifdef HAVE_MPI if (MPI_LONG_DOUBLE == MPI_DATATYPE_NULL) out = sum_to_all(double(in)); else MPI_Allreduce(&in,&out,1,MPI_LONG_DOUBLE,MPI_SUM,mycomm); #endif return out; } int sum_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_INT,MPI_SUM,mycomm); #endif return out; } int partial_sum_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Scan(&in,&out,1,MPI_INT,MPI_SUM,mycomm); #endif return out; } complex sum_to_all(complex in) { complex out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,2,MPI_DOUBLE,MPI_SUM,mycomm); #endif return out; } complex sum_to_all(complex in) { complex out = in; #ifdef HAVE_MPI if (MPI_LONG_DOUBLE == MPI_DATATYPE_NULL) { complex dout; dout = sum_to_all(complex(double(in.real()), double(in.imag()))); out = complex(dout.real(), dout.imag()); } else MPI_Allreduce(&in,&out,2,MPI_LONG_DOUBLE,MPI_SUM,mycomm); #endif return out; } bool or_to_all(bool in) { int in2 = in, out; #ifdef HAVE_MPI MPI_Allreduce(&in2,&out,1,MPI_INT,MPI_LOR,mycomm); #else out = in2; #endif return (bool) out; } void or_to_all(const int *in, int *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_INT,MPI_LOR,mycomm); #else memcpy(out, in, sizeof(int) * size); #endif } bool and_to_all(bool in) { int in2 = in, out; #ifdef HAVE_MPI MPI_Allreduce(&in2,&out,1,MPI_INT,MPI_LAND,mycomm); #else out = in2; #endif return (bool) out; } void and_to_all(const int *in, int *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_INT,MPI_LAND,mycomm); #else memcpy(out, in, sizeof(int) * size); #endif } void all_wait() { #ifdef HAVE_MPI MPI_Barrier(mycomm); #endif } int my_rank() { #ifdef HAVE_MPI int rank; MPI_Comm_rank(mycomm, &rank); return rank; #else return 0; #endif } int count_processors() { #ifdef HAVE_MPI int n; MPI_Comm_size(mycomm, &n); return n; #else return 1; #endif } void fields::boundary_communications(field_type ft) { // Communicate the data around! #if 0 // This is the blocking version, which should always be safe! for (int noti=0;notin_proc(), chunks[i]->n_proc(), comm_blocks[ft][pair], comm_size_tot(ft,pair)); } } #endif #ifdef HAVE_MPI const int maxreq = num_chunks*num_chunks; MPI_Request *reqs = new MPI_Request[maxreq]; MPI_Status *stats = new MPI_Status[maxreq]; int reqnum = 0; int *tagto = new int[count_processors()]; for (int i=0;i 0) { if (chunks[j]->is_mine() && !chunks[i]->is_mine()) MPI_Isend(comm_blocks[ft][pair], comm_size, MPI_REALNUM, chunks[i]->n_proc(), tagto[chunks[i]->n_proc()]++, mycomm, &reqs[reqnum++]); if (chunks[i]->is_mine() && !chunks[j]->is_mine()) MPI_Irecv(comm_blocks[ft][pair], comm_size, MPI_REALNUM, chunks[j]->n_proc(), tagto[chunks[j]->n_proc()]++, mycomm, &reqs[reqnum++]); } } delete[] tagto; if (reqnum > maxreq) abort("Too many requests!!!\n"); if (reqnum > 0) MPI_Waitall(reqnum, reqs, stats); delete[] reqs; delete[] stats; #else (void) ft; // unused #endif } // IO Routines... bool am_really_master() { return (my_global_rank() == 0); } void master_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (am_really_master()) { vprintf(fmt, ap); fflush(stdout); } va_end(ap); } static FILE *debf = NULL; void debug_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (debf == NULL) { char temp[50]; snprintf(temp, 50, "debug_out_%d", my_rank()); debf = fopen(temp,"w"); if (!debf) abort("Unable to open debug output %s\n", temp); } vfprintf(debf, fmt, ap); fflush(debf); va_end(ap); } void master_fprintf(FILE *f, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (am_master()) { vfprintf(f, fmt, ap); fflush(f); } va_end(ap); } FILE *master_fopen(const char *name, const char *mode) { FILE *f = am_master() ? fopen(name, mode) : 0; /* other processes need to know if fopen returned zero, in order to abort if fopen failed. If fopen was successfully, just return a random non-zero pointer (which is never used except to compare to zero) on non-master processes */ if (broadcast(0, bool(f != 0)) && !am_master()) f = (FILE *) name; return f; } void master_fclose(FILE *f) { if (am_master()) fclose(f); } /* The following functions bracket a "critical section," a region of code that should be executed by only one process at a time. They work by having each process wait for a message from the previous process before starting. Each critical section is passed an integer "tag"...ideally, this should be a unique identifier for each critical section so that messages from different critical sections don't get mixed up somehow. */ void begin_critical_section(int tag) { #ifdef HAVE_MPI int process_rank; MPI_Comm_rank(mycomm, &process_rank); if (process_rank > 0) { /* wait for a message before continuing */ MPI_Status status; int recv_tag = tag - 1; /* initialize to wrong value */ MPI_Recv(&recv_tag, 1, MPI_INT, process_rank - 1, tag, mycomm, &status); if (recv_tag != tag) abort("invalid tag received in begin_critical_section"); } #else UNUSED(tag); #endif } void end_critical_section(int tag) { #ifdef HAVE_MPI int process_rank, num_procs; MPI_Comm_rank(mycomm, &process_rank); MPI_Comm_size(mycomm, &num_procs); if (process_rank != num_procs - 1) { /* send a message to next process */ MPI_Send(&tag, 1, MPI_INT, process_rank + 1, tag, mycomm); } #else UNUSED(tag); #endif } /* Simple, somewhat hackish API to allow user to run multiple simulations in parallel in the same MPI job. The user calls mygroup = divide_parallel_processes(numgroups); to divide all of the MPI processes into numgroups equal groups, and to return the index (from 0 to numgroups-1) of the current group. From this point on, all fields etc. that you create and all calls from mympi.cpp will only communicate within your group of processes. However, there are two calls that you can use to switch back to globally communication among all processes: begin_global_communications(); ....do stuff.... end_global_communications(); It is important not to mix the two types; e.g. you cannot timestep a field created in the local group in global mode, or vice versa. */ int divide_parallel_processes(int numgroups) { #ifdef HAVE_MPI end_divide_parallel(); if (numgroups > count_processors()) abort("numgroups > count_processors"); int mygroup = (my_rank() * numgroups) / count_processors(); MPI_Comm_split(MPI_COMM_WORLD, mygroup, my_rank(), &mycomm); return mygroup; #else if (numgroups != 1) abort("cannot divide processes in non-MPI mode"); return 0; #endif } #ifdef HAVE_MPI static MPI_Comm mycomm_save = MPI_COMM_WORLD; #endif void begin_global_communications(void) { #ifdef HAVE_MPI mycomm_save = mycomm; mycomm = MPI_COMM_WORLD; #endif } void end_global_communications(void) { #ifdef HAVE_MPI mycomm = mycomm_save; mycomm_save = MPI_COMM_WORLD; #endif } void end_divide_parallel(void) { #ifdef HAVE_MPI if (mycomm != MPI_COMM_WORLD) MPI_Comm_free(&mycomm); if (mycomm_save != MPI_COMM_WORLD) MPI_Comm_free(&mycomm_save); mycomm = mycomm_save = MPI_COMM_WORLD; #endif } int my_global_rank() { #ifdef HAVE_MPI int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); return rank; #else return 0; #endif } } // namespace meep meep-1.3/src/output_directory.cpp0000644000175400001440000000775712506540456014172 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include "meep.hpp" using namespace std; namespace meep { const char symlink_name[] = "latest_output"; void structure::set_output_directory(const char *name) { char buf[300]; outdir = name; if (!quiet) master_printf("Using output directory %s/\n", name); if (readlink(symlink_name, buf, 300) > 0) { // Link already exists. unlink(symlink_name); } symlink(name, symlink_name); outdir = name; } void fields::set_output_directory(const char *name) { delete[] outdir; outdir = new char[strlen(name) + 1]; strcpy(outdir, name); for (int i=0;iset_output_directory(outdir); } void fields_chunk::set_output_directory(const char *name) { outdir = name; } static void cp(const char *a, const char *b) { FILE *fa = fopen(a,"r"); FILE *fb = fopen(b,"w"); if (!fa || !fb) return; int ca; while (1) { ca = getc(fa); if (ca == EOF) break; putc(ca,fb); } fclose(fa); fclose(fb); } static bool is_ok_dir(const char *dirname) { DIR *dir; bool direxists = 0; if (am_master()) { direxists = (dir = opendir(dirname)) != NULL; if (direxists) closedir(dir); else mkdir(dirname, 00777); } direxists = broadcast(0, direxists); return !direxists; } FILE *create_output_file(const char *dirname, const char *fname) { const int buflen = 300; char n[buflen]; snprintf(n, buflen, "%s/%s", dirname, fname); FILE *o = master_fopen(n, "w"); if (!o) abort("Unable to create file %s!\n", n); return o; } const char *make_output_directory(const char *exename, const char *jobname) { const int buflen = 300; char basename[buflen]; const char * const evil_suffs[] = { ".dac", ".cpp", ".cc", ".cxx", ".C" }; char stripped_name[buflen]; const char *bnp = exename; // stripped_name holds the actual name of the executable (dirs removed). const char *t; for (t=exename;*t;t++) { if (*t == '/') bnp = t+1; } snprintf(stripped_name, buflen, "%s", bnp); for (int i = 0; i < (int)(sizeof(evil_suffs) / sizeof(evil_suffs[0])); ++i) { int sufflen = strlen(evil_suffs[i]); if (strcmp(stripped_name + strlen(stripped_name) - sufflen, evil_suffs[i]) == 0 && strlen(stripped_name) > size_t(sufflen)) { stripped_name[strlen(stripped_name) - sufflen] = (char)0; break; } } char sourcename[buflen]; // Holds the "example.cpp" filename. snprintf(sourcename, buflen, "%s.cpp", stripped_name); if (jobname != NULL) { snprintf(basename, buflen, "%s", jobname); } else { snprintf(basename, buflen, "%s", stripped_name); } static char outdirname[buflen]; snprintf(outdirname, buflen, "%s-out", basename); { int i = 0; while (!is_ok_dir(outdirname)) { if (!quiet) master_printf("Output directory %s already exists!\n", outdirname); snprintf(outdirname, buflen, "%s-out-%d", basename, i++); } } char outsrcname[buflen]; snprintf(outsrcname, buflen, "%s/%s", outdirname, sourcename); cp(sourcename, outsrcname); return outdirname; } void trash_output_directory(const char *dirname) { if (am_master()) mkdir(dirname, 00777); } } // namespace meep meep-1.3/src/bicgstab.hpp0000644000175400001440000000241112506540456012307 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef BICGSTAB_H #define BICGSTAB_H #include "meep.hpp" namespace meep { typedef void (*bicgstab_op)(const realnum *x, realnum *y, void *data); int bicgstabL(const int L, const int n, realnum *x, bicgstab_op A, void *Adata, const realnum *b, const double tol, int *iters, // input *iters = max iters, output = actual iters realnum *work, // if you pass work=NULL, bicgstab returns nwork const bool quiet); } // namespace meep #endif /* BICGSTAB_H */ meep-1.3/src/fields.cpp0000644000175400001440000004646212506540456012010 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { fields::fields(structure *s, double m, double beta, bool zero_fields_near_cylorigin) : S(s->S), gv(s->gv), user_volume(s->user_volume), v(s->v), m(m), beta(beta) { verbosity = 0; synchronized_magnetic_fields = 0; outdir = new char[strlen(s->outdir) + 1]; strcpy(outdir, s->outdir); if (gv.dim == Dcyl) S = S + r_to_minus_r_symmetry(m); phasein_time = 0; bands = NULL; for (int d=0;d<5;d++) { k[d] = 0.0; eikna[d] = 1.0; } is_real = 0; a = gv.a; dt = s->dt; t = 0; sources = NULL; fluxes = NULL; // Time stuff: for (int i = 0; i < MEEP_TIMING_STACK_SZ; ++i) was_working_on[i] = Other; working_on = Other; for (int i=0;i<=Other;i++) times_spent[i] = 0.0; last_wall_time = last_step_output_wall_time = -1; am_now_working_on(Other); num_chunks = s->num_chunks; typedef fields_chunk *fields_chunk_ptr; chunks = new fields_chunk_ptr[num_chunks]; for (int i=0;ichunks[i], outdir, m, beta, zero_fields_near_cylorigin); FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) { comm_sizes[ft][ip] = new int[num_chunks*num_chunks]; for (int i=0;iuser_volume.num_direction(d) == 1) use_bloch(d, 0.0); } fields::fields(const fields &thef) : S(thef.S), gv(thef.gv), user_volume(thef.user_volume), v(thef.v) { verbosity = 0; synchronized_magnetic_fields = thef.synchronized_magnetic_fields; outdir = new char[strlen(thef.outdir) + 1]; strcpy(outdir, thef.outdir); m = thef.m; beta = thef.beta; phasein_time = thef.phasein_time; bands = NULL; for (int d=0;d<5;d++) { k[d] = thef.k[d]; eikna[d] = thef.eikna[d]; } is_real = thef.is_real; a = thef.a; dt = thef.dt; t = thef.t; sources = NULL; fluxes = NULL; // Time stuff: for (int i = 0; i < MEEP_TIMING_STACK_SZ; ++i) was_working_on[i] = Other; working_on = Other; for (int i=0;i<=Other;i++) times_spent[i] = 0.0; last_wall_time = -1; am_now_working_on(Other); num_chunks = thef.num_chunks; typedef fields_chunk *fields_chunk_ptr; chunks = new fields_chunk_ptr[num_chunks]; for (int i=0;iverbose(gv); } void fields::use_real_fields() { LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic && k[d] != 0.0) abort("Can't use real fields with bloch boundary conditions!\n"); is_real = 1; for (int i=0;iuse_real_fields(); chunk_connections_valid = false; } bool fields::have_component(component c) { for (int i=0;if[c][0]) return true; return false; } fields_chunk::~fields_chunk() { if (s->refcount-- <= 1) delete s; // delete if not shared if (new_s && new_s->refcount-- <= 1) delete new_s; // delete if not shared is_real = 0; // So that we can make sure to delete everything... // for mu=1 non-PML regions, H==B to save space/time - don't delete twice! DOCMP2 FOR_H_AND_B(hc,bc) if (f[hc][cmp] == f[bc][cmp]) f[bc][cmp] = NULL; DOCMP2 FOR_COMPONENTS(c) { delete[] f[c][cmp]; delete[] f_u[c][cmp]; delete[] f_w[c][cmp]; delete[] f_cond[c][cmp]; delete[] f_minus_p[c][cmp]; delete[] f_w_prev[c][cmp]; delete[] f_backup[c][cmp]; delete[] f_u_backup[c][cmp]; delete[] f_w_backup[c][cmp]; delete[] f_cond_backup[c][cmp]; } delete[] f_rderiv_int; FOR_FIELD_TYPES(ft) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) delete[] connections[ft][ip][io]; FOR_FIELD_TYPES(ft) delete[] connection_phases[ft]; while (dft_chunks) { dft_chunk *nxt = dft_chunks->next_in_chunk; delete dft_chunks; dft_chunks = nxt; } FOR_FIELD_TYPES(ft) { delete sources[ft]; delete[] zeroes[ft]; } FOR_FIELD_TYPES(ft) for (polarization_state *cur = pol[ft]; cur; ) { polarization_state *p = cur; cur = cur->next; p->s->delete_internal_data(p->data); delete p; } } fields_chunk::fields_chunk(structure_chunk *the_s, const char *od, double m, double beta, bool zero_fields_near_cylorigin) : gv(the_s->gv), v(the_s->v), m(m), zero_fields_near_cylorigin(zero_fields_near_cylorigin), beta(beta) { s = the_s; s->refcount++; verbosity = 0; outdir = od; new_s = NULL; bands = NULL; is_real = 0; a = s->a; Courant = s->Courant; dt = s->dt; dft_chunks = NULL; FOR_FIELD_TYPES(ft) { polarization_state *cur = NULL; pol[ft] = NULL; for (susceptibility *chiP = the_s->chiP[ft]; chiP; chiP = chiP->next) { polarization_state *p = new polarization_state; // P and data lazily allocated in update_pols p->data = NULL; p->s = chiP; p->next = NULL; if (cur) { cur->next = p; cur = p; } else { pol[ft] = cur = p; } } } doing_solve_cw = false; solve_cw_omega = 0.0; FOR_FIELD_TYPES(ft) sources[ft] = NULL; FOR_COMPONENTS(c) DOCMP2 { f[c][cmp] = NULL; f_u[c][cmp] = NULL; f_w[c][cmp] = NULL; f_cond[c][cmp] = NULL; f_minus_p[c][cmp] = NULL; f_w_prev[c][cmp] = NULL; f_backup[c][cmp] = NULL; f_u_backup[c][cmp] = NULL; f_w_backup[c][cmp] = NULL; f_cond_backup[c][cmp] = NULL; } f_rderiv_int = NULL; FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) num_connections[ft][ip][Incoming] = num_connections[ft][ip][Outgoing] = 0; connection_phases[ft] = 0; for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) connections[ft][ip][io] = NULL; zeroes[ft] = NULL; num_zeroes[ft] = 0; } figure_out_step_plan(); } fields_chunk::fields_chunk(const fields_chunk &thef) : gv(thef.gv), v(thef.v) { s = thef.s; s->refcount++; verbosity = thef.verbosity; outdir = thef.outdir; m = thef.m; zero_fields_near_cylorigin = thef.zero_fields_near_cylorigin; beta = thef.beta; new_s = thef.new_s; new_s->refcount++; bands = NULL; is_real = thef.is_real; a = thef.a; Courant = thef.Courant; dt = thef.dt; dft_chunks = NULL; FOR_FIELD_TYPES(ft) { polarization_state *cur = NULL; for (polarization_state *ocur = thef.pol[ft]; ocur; ocur = ocur->next) { polarization_state *p = new polarization_state; p->data = NULL; p->s = ocur->s; p->next = NULL; pol[ft] = NULL; if (ocur->data) p->data = p->s->copy_internal_data(p->data); if (cur) { cur->next = p; cur = p; } else { pol[ft] = cur = p; } } } doing_solve_cw = thef.doing_solve_cw; solve_cw_omega = thef.solve_cw_omega; FOR_FIELD_TYPES(ft) sources[ft] = NULL; FOR_COMPONENTS(c) DOCMP2 { f[c][cmp] = NULL; f_u[c][cmp] = NULL; f_w[c][cmp] = NULL; f_cond[c][cmp] = NULL; f_backup[c][cmp] = NULL; f_u_backup[c][cmp] = NULL; f_w_backup[c][cmp] = NULL; f_cond_backup[c][cmp] = NULL; } FOR_COMPONENTS(c) DOCMP { if (!is_magnetic(c) && thef.f[c][cmp]) { f[c][cmp] = new realnum[gv.ntot()]; memcpy(f[c][cmp], thef.f[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_u[c][cmp]) { f_u[c][cmp] = new realnum[gv.ntot()]; memcpy(f_u[c][cmp], thef.f_u[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_w[c][cmp]) { f_w[c][cmp] = new realnum[gv.ntot()]; memcpy(f_w[c][cmp], thef.f_w[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_cond[c][cmp]) { f_cond[c][cmp] = new realnum[gv.ntot()]; memcpy(f_cond[c][cmp], thef.f_cond[c][cmp], sizeof(realnum) * gv.ntot()); } } FOR_MAGNETIC_COMPONENTS(c) DOCMP { if (thef.f[c][cmp] == thef.f[c-Hx+Bx][cmp]) f[c][cmp] = f[c-Hx+Bx][cmp]; else if (thef.f[c][cmp]) { f[c][cmp] = new realnum[gv.ntot()]; memcpy(f[c][cmp], thef.f[c][cmp], sizeof(realnum) * gv.ntot()); } } FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) num_connections[ft][ip][Incoming] = num_connections[ft][ip][Outgoing] = 0; connection_phases[ft] = 0; for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) connections[ft][ip][io] = NULL; zeroes[ft] = NULL; num_zeroes[ft] = 0; } FOR_COMPONENTS(c) DOCMP2 { if (thef.f_minus_p[c][cmp]) { f_minus_p[c][cmp] = new realnum[gv.ntot()]; memcpy(f_minus_p[c][cmp], thef.f_minus_p[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_w_prev[c][cmp]) { f_w_prev[c][cmp] = new realnum[gv.ntot()]; memcpy(f_w_prev[c][cmp], thef.f_w_prev[c][cmp], sizeof(realnum) * gv.ntot()); } } f_rderiv_int = NULL; figure_out_step_plan(); } static inline bool cross_negative(direction a, direction b) { if (a >= R) a = direction(a - 3); if (b >= R) b = direction(b - 3); return ((3+b-a)%3) == 2; } static inline direction cross(direction a, direction b) { if (a == b) abort("bug - cross expects different directions"); bool dcyl = a >= R || b >= R; if (a >= R) a = direction(a - 3); if (b >= R) b = direction(b - 3); direction c = direction((3+2*a-b)%3); if (dcyl && c < Z) return direction(c + 3); return c; } /* Call this whenever we modify the structure_chunk (fields_chunk::s) to implement copy-on-write semantics. See also structure::changing_chunks. */ void fields_chunk::changing_structure() { if (s->refcount > 1) { // this chunk is shared, so make a copy s->refcount--; s = new structure_chunk(s); } } void fields::figure_out_step_plan() { for (int i = 0; i < num_chunks; ++i) if (chunks[i]->is_mine()) chunks[i]->figure_out_step_plan(); } void fields_chunk::figure_out_step_plan() { FOR_COMPONENTS(cc) have_minus_deriv[cc] = have_plus_deriv[cc] = false; FOR_COMPONENTS(c1) if (f[c1][0]) { const direction dc1 = component_direction(c1); // Figure out which field components contribute. FOR_COMPONENTS(c2) if ((is_electric(c1) && is_magnetic(c2)) || (is_D(c1) && is_magnetic(c2)) || (is_magnetic(c1) && is_electric(c2)) || (is_B(c1) && is_electric(c2))) { const direction dc2 = component_direction(c2); if (dc1 != dc2 && gv.has_field(c2) && gv.has_field(c1) && (has_direction(gv.dim,cross(dc1,dc2)) || (gv.dim == Dcyl && has_field_direction(gv.dim,cross(dc1,dc2))))) { direction d_deriv = cross(dc1,dc2); if (cross_negative(dc2, dc1)) { minus_component[c1] = c2; have_minus_deriv[c1] = true; minus_deriv_direction[c1] = d_deriv; } else { plus_component[c1] = c2; have_plus_deriv[c1] = true; plus_deriv_direction[c1] = d_deriv; } } } } } bool is_tm(component c) { switch (c) { case Hx: case Hy: case Bx: case By: case Ez: case Dz: return true; default: return false; } return false; } static bool is_like(ndim d, component c1, component c2) { if (d != D2) return true; return !(is_tm(c1) ^ is_tm(c2)); } // this function should ordinarily not be called directly; // instead it should be called via require_component, // since only require_component knows what other field components // need to be allocated in addition to c bool fields_chunk::alloc_f(component c) { bool changed = false; if (is_mine()) DOCMP { if (!f[c][cmp]) { changed = true; if (is_magnetic(c)) { /* initially, we just set H == B ... later on, we lazily allocate H fields if needed (if mu != 1 or in PML) in update_eh */ component bc = direction_component(Bx, component_direction(c)); if (!f[bc][cmp]) { f[bc][cmp] = new realnum[gv.ntot()]; for (int i=0;is->has_chi(Ex, Z) || chunks[i]->s->has_chi(Ey, Z) || chunks[i]->s->has_chi(Ez, X) || chunks[i]->s->has_chi(Ez, Y) || chunks[i]->s->has_chi(Hx, Z) || chunks[i]->s->has_chi(Hy, Z) || chunks[i]->s->has_chi(Hz, X) || chunks[i]->s->has_chi(Hz, Y)) break; aniso2d = or_to_all(i < num_chunks); } if (aniso2d && beta != 0 && is_real) abort("Nonzero beta need complex fields when mu/epsilon couple TE and TM"); aniso2d = aniso2d || (beta != 0); // beta couples TE/TM // allocate fields if they haven't been allocated yet for this component int need_to_reconnect = 0; FOR_COMPONENTS(c_alloc) if (gv.has_field(c_alloc) && (is_like(gv.dim, c, c_alloc) || aniso2d)) for (int i = 0; i < num_chunks; ++i) if (chunks[i]->alloc_f(c_alloc)) need_to_reconnect++; if (need_to_reconnect) figure_out_step_plan(); if (sum_to_all(need_to_reconnect)) chunk_connections_valid = false; } void fields_chunk::remove_sources() { FOR_FIELD_TYPES(ft) { delete sources[ft]; sources[ft] = NULL; } } void fields::remove_sources() { delete sources; sources = NULL; for (int i=0;iremove_sources(); } void fields_chunk::remove_susceptibilities() { FOR_FIELD_TYPES(ft) { for (polarization_state *cur = pol[ft]; cur; ) { polarization_state *p = cur; cur = cur->next; p->s->delete_internal_data(p->data); delete p; } pol[ft] = NULL; } changing_structure(); s->remove_susceptibilities(); } void fields::remove_susceptibilities() { for (int i=0;iremove_susceptibilities(); } void fields::remove_fluxes() { delete fluxes; fluxes = NULL; } void fields_chunk::zero_fields() { FOR_COMPONENTS(c) DOCMP { #define ZERO(array) if (array) memset(array, 0, sizeof(realnum) * gv.ntot()) ZERO(f[c][cmp]); ZERO(f_u[c][cmp]); ZERO(f_w[c][cmp]); ZERO(f_cond[c][cmp]); ZERO(f_backup[c][cmp]); ZERO(f_u_backup[c][cmp]); ZERO(f_w_backup[c][cmp]); ZERO(f_cond_backup[c][cmp]); #undef ZERO } if (is_mine()) FOR_FIELD_TYPES(ft) for (polarization_state *p = pol[ft]; p; p = p->next) { if (p->data) p->s->init_internal_data(f, dt, gv, p->data); } } void fields::zero_fields() { for (int i=0;izero_fields(); } void fields::reset() { remove_sources(); remove_fluxes(); zero_fields(); t = 0; } void fields_chunk::use_real_fields() { is_real = 1; // for mu=1 non-PML regions, H==B to save space/time - don't delete twice! FOR_H_AND_B(hc,bc) if (f[hc][1] == f[bc][1]) f[bc][1] = NULL; FOR_COMPONENTS(c) if (f[c][1]) { delete[] f[c][1]; f[c][1] = 0; } if (is_mine()) FOR_FIELD_TYPES(ft) for (polarization_state *p = pol[ft]; p; p = p->next) { if (p->data) { // TODO: print an error message in this case? p->s->delete_internal_data(p->data); p->data = p->s->new_internal_data(f, gv); p->s->init_internal_data(f, dt, gv, p->data); } } } int fields::phase_in_material(const structure *snew, double time) { if (snew->num_chunks != num_chunks) abort("Can only phase in similar sets of chunks: %d vs %d\n", snew->num_chunks, num_chunks); for (int i=0;iis_mine()) chunks[i]->phase_in_material(snew->chunks[i]); phasein_time = (int) (time/dt); // FIXME: how to handle changes in susceptibilities? return phasein_time; } void fields_chunk::phase_in_material(structure_chunk *snew) { new_s = snew; new_s->refcount++; } int fields::is_phasing() { return phasein_time > 0; } bool fields::equal_layout(const fields &f) const { if (a != f.a || num_chunks != f.num_chunks || v != f.v || S != f.S) return false; for (int d=0;d<5;d++) if (k[d] != f.k[d]) return false; for (int i = 0; i < num_chunks; ++i) if (chunks[i]->a != f.chunks[i]->a || chunks[i]->v != f.chunks[i]->v) return false; return true; } // total computational grid_volume, including regions redundant by symmetry volume fields::total_volume(void) const { volume gv0 = gv.interior(); volume v = gv0; for (int n = 1; n < S.multiplicity(); ++n) v = v | S.transform(gv0, n); if (v.dim == Dcyl && v.in_direction_min(R) < 0) v.set_direction_min(R, 0); return v; } /* One-pixel periodic dimensions are used almost exclusively to emulate lower-dimensional computations, so if the user passes an empty size in that direction, they probably really intended to specify that whole dimension. This function detects that case. */ bool fields::nosize_direction(direction d) const { return (gv.has_boundary(Low, d) && gv.has_boundary(High, d) && boundaries[Low][d] == Periodic && boundaries[High][d] == Periodic && gv.num_direction(d) == 1); } void fields::set_solve_cw_omega(complex omega) { for (int i = 0; i < num_chunks; ++i) chunks[i]->set_solve_cw_omega(omega); } void fields::unset_solve_cw_omega() { for (int i = 0; i < num_chunks; ++i) chunks[i]->unset_solve_cw_omega(); } } // namespace meep meep-1.3/src/meep.hpp0000644000175400001440000017212712506540456011473 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEEP_H #define MEEP_H #include #include #include "meep/vec.hpp" #include "meep/mympi.hpp" namespace meep { /* We use the type realnum for large arrays, e.g. the fields. For local variables and small arrays, we use double precision, but for things like the fields we can often get away with single precision (since the errors are not dominated by roundoff). However, we will default to using double-precision for large arrays, as the factor of two in memory and the moderate increase in speed currently don't seem worth the loss of precision. */ #define MEEP_SINGLE 0 // 1 for single precision, 0 for double #if MEEP_SINGLE typedef float realnum; #else typedef double realnum; #endif extern bool quiet; // if true, suppress all non-error messages from Meep const double pi = 3.141592653589793238462643383276; const double infinity = HUGE_VAL; #ifdef NAN const double nan = NAN; #else const double nan = -7.0415659787563146e103; // ideally, a value never encountered in practice #endif /* generic base class, only used by subclassing: represents susceptibility polarizability vector P = chi(omega) W (where W = E or H). */ class susceptibility { public: susceptibility() { id = cur_id++; ntot = 0; next = NULL; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { sigma[c][d] = NULL; trivial_sigma[c][d] = true; } } susceptibility(const susceptibility &s) { id = s.id; ntot = s.ntot; next = NULL; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { sigma[c][d] = NULL; trivial_sigma[c][d] = true; } } virtual susceptibility *clone() const; virtual ~susceptibility() { FOR_COMPONENTS(c) FOR_DIRECTIONS(d) delete[] sigma[c][d]; delete next; } int get_id() const { return id; } bool operator==(const susceptibility &s) const { return id == s.id; }; // update all of the internal polarization state given the W field // at the current time step, possibly the previous field W_prev, etc. virtual void update_P(realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const { (void) P; (void) W; (void) W_prev; (void) dt; (void) gv; (void) P_internal_data; // avoid warnings for unused params } // subtract all of the internal polarizations from the given f_minus_p // field. Also given the fields array if it is needed for some reason. // Only update for ft fields. virtual void subtract_P(field_type ft, realnum *f_minus_p[NUM_FIELD_COMPONENTS][2], void *P_internal_data) const { (void) ft; (void) f_minus_p; (void) P_internal_data; } // whether, for the given field W, Meep needs to allocate P[c] virtual bool needs_P(component c, int cmp, realnum *W[NUM_FIELD_COMPONENTS][2]) const; // whether update_P will need the notowned part of W for this c // (which means that Meep will need to communicate it between chunks) virtual bool needs_W_notowned(component c, realnum *W[NUM_FIELD_COMPONENTS][2]) const; // whether update_P needs the W_prev field (from the previous timestep) virtual bool needs_W_prev() const { return false; } /* A susceptibility may be associated with any amount of internal data need to update the polarization field. This includes the polarization field(s) itself. It may also, for example, store the polarization field from previous timesteps, atomic-level populations, or other data. These routines return the size of this internal-data array and initialize it. */ virtual void* new_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], const grid_volume &gv) const { (void) W; (void) gv; return 0; } virtual void delete_internal_data(void *data) const; virtual void init_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *data) const { (void) W; (void) dt; (void) gv; (void) data; } virtual void *copy_internal_data(void *data) const { (void)data; return 0; } /* The following methods are used in boundaries.cpp to set up any extra communications that may be necessary at chunk boundaries for the internal data of a susceptibility's polarization state. */ /* the number of notowned fields/data in the internal data that are needed by update_P for the c Yee grid (note: we assume that we only have internal data for c's where we have external polarizations) */ virtual int num_internal_notowned_needed(component c, void *P_internal_data) const { (void) c; (void) P_internal_data; return 0; } /* the offset into the internal data of the n'th Yee-grid point in the c Yee grid for the inotowned internal field, where 0 <= inotowned < size_internal_notowned_needed. */ virtual realnum *internal_notowned_ptr(int inotowned, component c, int n, void *P_internal_data) const { (void) inotowned; (void) n; (void) c; (void) P_internal_data; return 0; } /* same thing as above, except this gives (possibly complex) internal fields that need to be multiplied by the same phase factor as the fields at boundaries. Note: we assume internal fields are complex if and only if !is_real (i.e. if EM fields are complex) */ virtual int num_cinternal_notowned_needed(component c, void *P_internal_data) const { (void) c; (void) P_internal_data; return 0; } // real/imaginary parts offsets for cmp = 0/1 virtual realnum *cinternal_notowned_ptr(int inotowned, component c, int cmp, int n, void *P_internal_data) const { (void) inotowned; (void) n; (void) c; (void) cmp; (void) P_internal_data; return 0; } susceptibility *next; int ntot; realnum *sigma[NUM_FIELD_COMPONENTS][5]; /* trivial_sigma[c][d] is true only if *none* of the processes has a nontrivial sigma (c,d) component. This differs, from sigma, which is non-NULL only if *this* process needs a nontrivial sigma (c,d). Coordinated between processes at add_susceptibility, no communication elsewhere. (We need this for boundary communcations between chunks, where one chunk might have sigma == 0 and the other != 0.) */ bool trivial_sigma[NUM_FIELD_COMPONENTS][5]; private: static int cur_id; // unique id to assign to next susceptibility object int id; // id for this object and its clones, for comparison purposes }; /* a Lorentzian susceptibility \chi(\omega) = sigma * omega_0^2 / (\omega_0^2 - \omega^2 - i\gamma \omega) If no_omega_0_denominator is true, then we omit the omega_0^2 factor in the denominator to obtain a Drude model. */ class lorentzian_susceptibility : public susceptibility { public: lorentzian_susceptibility(double omega_0, double gamma, bool no_omega_0_denominator = false) : omega_0(omega_0), gamma(gamma), no_omega_0_denominator(no_omega_0_denominator) {} virtual susceptibility *clone() const { return new lorentzian_susceptibility(*this); } virtual ~lorentzian_susceptibility() {} virtual void update_P(realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const; virtual void subtract_P(field_type ft, realnum *f_minus_p[NUM_FIELD_COMPONENTS][2], void *P_internal_data) const; virtual void *new_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], const grid_volume &gv) const; virtual void init_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *data) const; virtual void *copy_internal_data(void *data) const; virtual int num_cinternal_notowned_needed(component c, void *P_internal_data) const; virtual realnum *cinternal_notowned_ptr(int inotowned, component c, int cmp, int n, void *P_internal_data) const; protected: double omega_0, gamma; bool no_omega_0_denominator; }; /* like a Lorentzian susceptibility, but the polarization equation includes white noise with a specified amplitude */ class noisy_lorentzian_susceptibility : public lorentzian_susceptibility { public: noisy_lorentzian_susceptibility(double noise_amp, double omega_0, double gamma, bool no_omega_0_denominator = false) : lorentzian_susceptibility(omega_0, gamma, no_omega_0_denominator), noise_amp(noise_amp) {} virtual susceptibility *clone() const { return new noisy_lorentzian_susceptibility(*this); } virtual void update_P(realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const; protected: double noise_amp; }; class multilevel_susceptibility : public susceptibility { public: multilevel_susceptibility() : L(0), T(0), Gamma(0), N0(0), alpha(0), omega(0), gamma(0) {} multilevel_susceptibility(int L, int T, const realnum *Gamma, const realnum *N0, const realnum *alpha, const realnum *omega, const realnum *gamma, const realnum *sigmat); multilevel_susceptibility(const multilevel_susceptibility &from); virtual susceptibility *clone() const { return new multilevel_susceptibility(*this); } virtual ~multilevel_susceptibility(); virtual void update_P(realnum *W[NUM_FIELD_COMPONENTS][2], realnum *W_prev[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *P_internal_data) const; virtual void subtract_P(field_type ft, realnum *f_minus_p[NUM_FIELD_COMPONENTS][2], void *P_internal_data) const; virtual void *new_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], const grid_volume &gv) const; virtual void init_internal_data(realnum *W[NUM_FIELD_COMPONENTS][2], double dt, const grid_volume &gv, void *data) const; virtual void *copy_internal_data(void *data) const; virtual void delete_internal_data(void *data) const; virtual int num_cinternal_notowned_needed(component c, void *P_internal_data) const; virtual realnum *cinternal_notowned_ptr(int inotowned, component c, int cmp, int n, void *P_internal_data) const; // always need notowned W and W_prev for E dot dP/dt terms virtual bool needs_W_notowned(component c, realnum *W[NUM_FIELD_COMPONENTS][2]) const { (void) c; (void) W; return true; } virtual bool needs_W_prev() const { return true; } protected: int L; // number of atom levels int T; // number of optical transitions realnum *Gamma; // LxL matrix of relaxation rates Gamma[i*L+j] from i -> j realnum *N0; // L initial populations realnum *alpha; // LxT matrix of transition coefficients 1/omega realnum *omega; // T transition frequencies realnum *gamma; // T optical loss rates realnum *sigmat; // 5*T transition-specific sigma-diagonal factors }; class grace; // h5file.cpp: HDF5 file I/O. Most users, if they use this // class at all, will only use the constructor to open the file, and // will otherwise use the fields::output_hdf5 functions. class h5file { public: typedef enum { READONLY, READWRITE, WRITE } access_mode; h5file(const char *filename_, access_mode m=READWRITE, bool parallel_=true); ~h5file(); // closes the files (and any open dataset) bool ok(); realnum *read(const char *dataname, int *rank, int *dims, int maxrank); void write(const char *dataname, int rank, const int *dims, realnum *data, bool single_precision = true); char *read(const char *dataname); void write(const char *dataname, const char *data); void create_data(const char *dataname, int rank, const int *dims, bool append_data = false, bool single_precision = true); void extend_data(const char *dataname, int rank, const int *dims); void create_or_extend_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision); void write_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data); void done_writing_chunks(); void read_size(const char *dataname, int *rank, int *dims, int maxrank); void read_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data); void remove(); void remove_data(const char *dataname); const char *file_name() const { return filename; } void prevent_deadlock(); // hackery for exclusive mode private: access_mode mode; char *filename; bool parallel; bool is_cur(const char *dataname); void unset_cur(); void set_cur(const char *dataname, void *data_id); char *cur_dataname; bool cur_append_data; /* linked list to keep track of which datasets we are extending... this is necessary so that create_or_extend_data can know whether to create (overwrite) a dataset or extend it. */ struct extending_s { int dindex; char *dataname; struct extending_s *next; } *extending; extending_s *get_extending(const char *dataname) const; /* store hid_t values as hid_t* cast to void*, so that files including meep.h don't need hdf5.h */ void *id; /* file */ void *cur_id; /* dataset, if any */ void *get_id(); // get current (file) id, opening/creating file if needed void close_id(); }; typedef double (*pml_profile_func)(double u, void *func_data); #define DEFAULT_SUBPIXEL_TOL 1e-4 #define DEFAULT_SUBPIXEL_MAXEVAL 100000 /* This class is used to compute position-dependent material properties like the dielectric function, permeability (mu), polarizability sigma, nonlinearities, et cetera. Simple cases of stateless functions are handled by canned subclasses below, but more complicated cases can be handled by creating a user-defined subclass of material_function. It is useful to group different properties into one class because it is likely that complicated implementations will share state between properties. */ class material_function { material_function(const material_function &ef) {(void)ef;} // prevent copying public: material_function() {} virtual ~material_function() {} /* Specify a restricted grid_volume: all subsequent eps/sigma/etc calls will be for points inside v, until the next set_volume. */ virtual void set_volume(const volume &v) {(void)v;} virtual void unset_volume(void) {} // unrestrict the grid_volume virtual double chi1p1(field_type ft, const vec &r) { (void)ft; (void)r; return 1.0; } /* scalar dielectric function */ virtual double eps(const vec &r) { return chi1p1(E_stuff, r); } /* scalar permeability function */ virtual bool has_mu() { return false; } /* true if mu != 1 */ virtual double mu(const vec &r) { return chi1p1(H_stuff, r); } /* scalar conductivity function */ virtual bool has_conductivity(component c) { (void)c; return false; } virtual double conductivity(component c, const vec &r) { (void) c; (void)r; return 0.0; } // fallback routine based on spherical quadrature vec normal_vector(field_type ft, const volume &v); /* Return c'th row of effective 1/(1+chi1) tensor in the given grid_volume v ... virtual so that e.g. libctl can override with more-efficient libctlgeom-based routines. maxeval == 0 if no averaging desired. */ virtual void eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); /* polarizability sigma function: return c'th row of tensor */ virtual void sigma_row(component c, double sigrow[3], const vec &r) { (void) c; (void) r; sigrow[0] = sigrow[1] = sigrow[2] = 0.0; } // Nonlinear susceptibilities virtual bool has_chi3(component c) { (void)c; return false; } virtual double chi3(component c, const vec &r) { (void)c; (void)r; return 0.0; } virtual bool has_chi2(component c) { (void)c; return false; } virtual double chi2(component c, const vec &r) { (void)c; (void)r; return 0.0; } }; class simple_material_function : public material_function { double (*f)(const vec &); public: simple_material_function(double (*func)(const vec &)) { f = func; } virtual ~simple_material_function() {} virtual double chi1p1(field_type ft, const vec &r) { (void)ft; return f(r); } virtual double eps(const vec &r) { return f(r); } virtual double mu(const vec &r) { return f(r); } virtual double conductivity(component c, const vec &r) { (void)c; return f(r); } virtual void sigma_row(component c, double sigrow[3], const vec &r) { sigrow[0] = sigrow[1] = sigrow[2] = 0.0; sigrow[component_index(c)] = f(r); } virtual double chi3(component c, const vec &r) { (void)c; return f(r); } virtual double chi2(component c, const vec &r) { (void)c; return f(r); } }; class structure; class structure_chunk { public: double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a realnum *chi3[NUM_FIELD_COMPONENTS], *chi2[NUM_FIELD_COMPONENTS]; realnum *chi1inv[NUM_FIELD_COMPONENTS][5]; bool trivial_chi1inv[NUM_FIELD_COMPONENTS][5]; realnum *conductivity[NUM_FIELD_COMPONENTS][5]; realnum *condinv[NUM_FIELD_COMPONENTS][5]; // cache of 1/(1+conduct*dt/2) bool condinv_stale; // true if condinv needs to be recomputed double *sig[5], *kap[5], *siginv[5]; // conductivity array for uPML int sigsize[5]; // conductivity array size grid_volume gv; // integer grid_volume that could be bigger than non-overlapping v below volume v; susceptibility *chiP[NUM_FIELD_TYPES]; // only E_stuff and H_stuff are used int refcount; // reference count of objects using this structure_chunk ~structure_chunk(); structure_chunk(const grid_volume &gv, const volume &vol_limit, double Courant, int proc_num); structure_chunk(const structure_chunk *); void set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval); bool has_chi(component c, direction d) const; bool has_chisigma(component c, direction d) const; bool has_chi1inv(component c, direction d) const; void set_conductivity(component c, material_function &eps); void update_condinv(); void set_chi3(component c, material_function &eps); void set_chi2(component c, material_function &eps); void use_pml(direction, double dx, double boundary_loc, double Rasymptotic, double mean_stretch, pml_profile_func pml_profile, void *pml_profile_data, double pml_profile_integral, double pml_profile_integral_u); void add_susceptibility(material_function &sigma, field_type ft, const susceptibility &sus); void mix_with(const structure_chunk *, double); int n_proc() const { return the_proc; } // Says which proc owns me! int is_mine() const { return the_is_mine; } void remove_susceptibilities(); // monitor.cpp double get_chi1inv(component, direction, const ivec &iloc) const; double get_inveps(component c, direction d, const ivec &iloc) const { return get_chi1inv(c, d, iloc); } double max_eps() const; private: double pml_fmin; int the_proc; int the_is_mine; }; double pml_quadratic_profile(double, void*); // linked list of descriptors for boundary regions (currently just for PML) class boundary_region { public: typedef enum { NOTHING_SPECIAL, PML } boundary_region_kind; boundary_region() : kind(NOTHING_SPECIAL), thickness(0.0), Rasymptotic(1e-16), mean_stretch(1.0), pml_profile(NULL), pml_profile_data(NULL), pml_profile_integral(1.0), pml_profile_integral_u(1.0), d(NO_DIRECTION), side(Low), next(0) {} boundary_region(boundary_region_kind kind, double thickness, double Rasymptotic, double mean_stretch, pml_profile_func pml_profile, void* pml_profile_data, double pml_profile_integral, double pml_profile_integral_u, direction d, boundary_side side, boundary_region *next = 0) : kind(kind), thickness(thickness), Rasymptotic(Rasymptotic), mean_stretch(mean_stretch), pml_profile(pml_profile), pml_profile_data(pml_profile_data), pml_profile_integral(pml_profile_integral), pml_profile_integral_u(pml_profile_integral_u), d(d), side(side), next(next) {} boundary_region(const boundary_region &r) : kind(r.kind), thickness(r.thickness), Rasymptotic(r.Rasymptotic), mean_stretch(r.mean_stretch), pml_profile(r.pml_profile), pml_profile_data(r.pml_profile_data), pml_profile_integral(r.pml_profile_integral), pml_profile_integral_u(r.pml_profile_integral_u), d(r.d), side(r.side) { next = r.next ? new boundary_region(*r.next) : 0; } ~boundary_region() { if (next) delete next; } void operator=(const boundary_region &r) { kind = r.kind; thickness = r.thickness; Rasymptotic = r.Rasymptotic; mean_stretch = r.mean_stretch; pml_profile = r.pml_profile; pml_profile_data = r.pml_profile_data; pml_profile_integral = r.pml_profile_integral; pml_profile_integral_u = r.pml_profile_integral_u; d = r.d; side = r.side; if (next) delete next; next = r.next ? new boundary_region(*r.next) : 0; } boundary_region operator+(const boundary_region &r0) const { boundary_region r(*this), *cur = &r; while (cur->next) cur = cur->next; cur->next = new boundary_region(r0); return r; } boundary_region operator*(double strength_mult) const { boundary_region r(*this), *cur = &r; while (cur) { cur->Rasymptotic = pow(cur->Rasymptotic, strength_mult); cur = cur->next; } return r; } void apply(structure *s) const; void apply(const structure *s, structure_chunk *sc) const; bool check_ok(const grid_volume &gv) const; private: boundary_region_kind kind; double thickness, Rasymptotic, mean_stretch; pml_profile_func pml_profile; void *pml_profile_data; double pml_profile_integral, pml_profile_integral_u; direction d; boundary_side side; boundary_region *next; }; boundary_region pml(double thickness, direction d, boundary_side side, double Rasymptotic = 1e-15, double mean_stretch = 1.0); boundary_region pml(double thickness, direction d, double Rasymptotic = 1e-15, double mean_stretch = 1.0); boundary_region pml(double thickness, double Rasymptotic = 1e-15, double mean_stretch = 1.0); #define no_pml() boundary_region() class structure { public: structure_chunk **chunks; int num_chunks; grid_volume gv, user_volume; double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a volume v; symmetry S; const char *outdir; grid_volume *effort_volumes; double *effort; int num_effort_volumes; ~structure(); structure(); structure(const grid_volume &gv, material_function &eps, const boundary_region &br = boundary_region(), const symmetry &s = meep::identity(), int num_chunks = 0, double Courant = 0.5, bool use_anisotropic_averaging=false, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); structure(const grid_volume &gv, double eps(const vec &), const boundary_region &br = boundary_region(), const symmetry &s = meep::identity(), int num_chunks = 0, double Courant = 0.5, bool use_anisotropic_averaging=false, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); structure(const structure *); structure(const structure &); void set_materials(material_function &mat, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); bool has_chi(component c, direction d) const; void set_epsilon(material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_epsilon(double eps(const vec &), bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_mu(material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_mu(double mu(const vec &), bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_conductivity(component c, material_function &conductivity); void set_conductivity(component C, double conductivity(const vec &)); void set_chi3(component c, material_function &eps); void set_chi3(material_function &eps); void set_chi3(double eps(const vec &)); void set_chi2(component c, material_function &eps); void set_chi2(material_function &eps); void set_chi2(double eps(const vec &)); void add_susceptibility(double sigma(const vec &), field_type c, const susceptibility &sus); void add_susceptibility(material_function &sigma, field_type c, const susceptibility &sus); void remove_susceptibilities(); void set_output_directory(const char *name); void mix_with(const structure *, double); bool equal_layout(const structure &) const; void print_layout(void) const; // monitor.cpp double get_chi1inv(component, direction, const ivec &origloc) const; double get_chi1inv(component, direction, const vec &loc) const; double get_inveps(component c, direction d, const ivec &origloc) const { return get_chi1inv(c, d, origloc); } double get_inveps(component c, direction d, const vec &loc) const { return get_chi1inv(c, d, loc); } double get_eps(const vec &loc) const; double get_mu(const vec &loc) const; double max_eps() const; friend class boundary_region; private: void use_pml(direction d, boundary_side b, double dx); void add_to_effort_volumes(const grid_volume &new_effort_volume, double extra_effort); void choose_chunkdivision(const grid_volume &gv, int num_chunks, const boundary_region &br, const symmetry &s); void check_chunks(); void changing_chunks(); }; class src_vol; class bandsdata; class fields; class fields_chunk; class flux_vol; // Time-dependence of a current source, intended to be overridden by // subclasses. current() and dipole() are be related by // current = d(dipole)/dt (or rather, the finite-difference equivalent). class src_time { public: // the following variable specifies whether the current // source is specified as a current or as an integrated // current (a dipole moment), if possible. In the original Meep, // by default electric sources are integrated and magnetic // sources are not, but this may change. bool is_integrated; src_time() { is_integrated = true; current_time = nan; current_current = 0.0; next = NULL; } virtual ~src_time() { delete next; } src_time(const src_time &t) { is_integrated = t.is_integrated; current_time = t.current_time; current_current = t.current_current; current_dipole = t.current_dipole; if (t.next) next = t.next->clone(); else next = NULL; } std::complex dipole() const { return current_dipole; } std::complex current() const { return current_current; } void update(double time, double dt) { if (time != current_time) { current_dipole = dipole(time); current_current = current(time, dt); current_time = time; } } // subclasses *can* override this method in order to specify the // current directly rather than as the derivative of dipole. // in that case you would probably ignore the dt argument. virtual std::complex current(double time, double dt) const { return ((dipole(time + dt) - dipole(time)) / dt); } double last_time_max() { return last_time_max(0.0); } double last_time_max(double after); src_time *add_to(src_time *others, src_time **added) const; src_time *next; // subclasses should override these methods: virtual std::complex dipole(double time) const { (void)time; return 0; } virtual double last_time() const { return 0.0; } virtual src_time *clone() const { return new src_time(*this); } virtual bool is_equal(const src_time &t) const { (void)t; return 1; } virtual std::complex frequency() const { return 0.0; } virtual void set_frequency(std::complex f) { (void) f; } private: double current_time; std::complex current_dipole, current_current; }; bool src_times_equal(const src_time &t1, const src_time &t2); // Gaussian-envelope source with given frequency, width, peak-time, cutoff class gaussian_src_time : public src_time { public: gaussian_src_time(double f, double fwidth, double s = 5.0); gaussian_src_time(double f, double w, double start_time, double end_time); virtual ~gaussian_src_time() {} virtual std::complex dipole(double time) const; virtual double last_time() const { return float(peak_time + cutoff); }; virtual src_time *clone() const { return new gaussian_src_time(*this); } virtual bool is_equal(const src_time &t) const; virtual std::complex frequency() const { return freq; } virtual void set_frequency(std::complex f) { freq = real(f); } private: double freq, width, peak_time, cutoff; }; // Continuous (CW) source with (optional) slow turn-on and/or turn-off. class continuous_src_time : public src_time { public: continuous_src_time(std::complex f, double w = 0.0, double st = 0.0, double et = infinity, double s = 3.0) : freq(f), width(w), start_time(float(st)), end_time(float(et)), slowness(s) {} virtual ~continuous_src_time() {} virtual std::complex dipole(double time) const; virtual double last_time() const { return end_time; }; virtual src_time *clone() const { return new continuous_src_time(*this); } virtual bool is_equal(const src_time &t) const; virtual std::complex frequency() const { return freq; } virtual void set_frequency(std::complex f) { freq = f; } private: std::complex freq; double width, start_time, end_time, slowness; }; // user-specified source function with start and end times class custom_src_time : public src_time { public: custom_src_time(std::complex (*func)(double t, void *), void *data, double st = -infinity, double et = infinity) : func(func), data(data), start_time(float(st)), end_time(float(et)) {} virtual ~custom_src_time() {} virtual std::complex current(double time, double dt) const { if (is_integrated) return src_time::current(time,dt); else return dipole(time); } virtual std::complex dipole(double time) const { float rtime = float(time); if (rtime >= start_time && rtime <= end_time) return func(time,data); else return 0.0; } virtual double last_time() const { return end_time; }; virtual src_time *clone() const { return new custom_src_time(*this); } virtual bool is_equal(const src_time &t) const; private: std::complex (*func)(double t, void *); void *data; double start_time, end_time; }; class monitor_point { public: monitor_point(); ~monitor_point(); vec loc; double t; std::complex f[NUM_FIELD_COMPONENTS]; monitor_point *next; std::complex get_component(component); double poynting_in_direction(direction d); double poynting_in_direction(vec direction_v); // When called with only its first four arguments, fourier_transform // performs an FFT on its monitor points, putting the frequencies in f // and the amplitudes in a. Yes, the frequencies are trivial and // redundant, but this saves you the risk of making a mistake in // converting your units. Note also, that in this case f is always a // real number, although it's stored in a complex. // // Note that in either case, fourier_transform assumes that the monitor // points are all equally spaced in time. void fourier_transform(component w, std::complex **a, std::complex **f, int *numout, double fmin=0.0, double fmax=0.0, int maxbands=100); // harminv works much like fourier_transform, except that it is not yet // implemented. void harminv(component w, std::complex **a, std::complex **f, int *numout, double fmin, double fmax, int maxbands); }; // dft.cpp // this should normally only be created with fields::add_dft class dft_chunk { public: dft_chunk(fields_chunk *fc_, ivec is_, ivec ie_, vec s0_, vec s1_, vec e0_, vec e1_, double dV0_, double dV1_, std::complex scale_, std::complex extra_weight_, component c_, bool use_centered_grid, ivec shift_, const symmetry &S_, int sn_, int vc, const void *data_); ~dft_chunk(); void update_dft(double time); void scale_dft(std::complex scale); void operator-=(const dft_chunk &chunk); // the frequencies to loop_in_chunks double omega_min, domega; int Nomega; component c; // component to DFT (possibly transformed by symmetry) int N; // number of spatial points (on epsilon grid) std::complex *dft; // N x Nomega array of DFT values. struct dft_chunk *next_in_chunk; // per-fields_chunk list of DFT chunks struct dft_chunk *next_in_dft; // next for this particular DFT vol./component /* When computing things like -0.5*|E|^2 for the stress tensor, we cannot incorporate the minus sign into the scale factor because we only ever compute |scale|^2. Thus, it is necessary to store an additional weight factor with the dft_chunk to record any additional negative or complex weight factor to be used in computations involving the fourier-transformed fields. Because it is used in computations involving dft[...], it needs to be public. */ std::complex extra_weight; // parameters passed from field_integrate: fields_chunk *fc; ivec is, ie; vec s0, s1, e0, e1; double dV0, dV1; bool sqrt_dV_and_interp_weights; std::complex scale; // scale factor * phase from shift and symmetry ivec shift; symmetry S; int sn; // cache of exp(iwt) * scale, of length Nomega std::complex *dft_phase; int avg1, avg2; // index offsets for average to get epsilon grid int vc; // component descriptor from the original volume }; void save_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix = 0); void load_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix = 0); void save_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix = 0); void load_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix = 0); // dft.cpp (normally created with fields::add_dft_flux) class dft_flux { public: dft_flux(const component cE_, const component cH_, dft_chunk *E_, dft_chunk *H_, double fmin, double fmax, int Nf); dft_flux(const dft_flux &f); double *flux(); void save_hdf5(h5file *file, const char *dprefix = 0); void load_hdf5(h5file *file, const char *dprefix = 0); void operator-=(const dft_flux &fl) { if (E && fl.E) *E -= *fl.E; if (H && fl.H) *H -= *fl.H; } void save_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void load_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void scale_dfts(std::complex scale); void remove(); double freq_min, dfreq; int Nfreq; dft_chunk *E, *H; component cE, cH; }; // stress.cpp (normally created with fields::add_dft_force) class dft_force { public: dft_force(dft_chunk *offdiag1_, dft_chunk *offdiag2_, dft_chunk *diag_, double fmin, double fmax, int Nf); dft_force(const dft_force &f); double *force(); void save_hdf5(h5file *file, const char *dprefix = 0); void load_hdf5(h5file *file, const char *dprefix = 0); void operator-=(const dft_force &fl); void save_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void load_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void scale_dfts(std::complex scale); void remove(); double freq_min, dfreq; int Nfreq; dft_chunk *offdiag1, *offdiag2, *diag; }; // near2far.cpp (normally created with fields::add_dft_near2far) class dft_near2far { public: /* fourier tranforms of tangential E and H field components in a medium with the given scalar eps and mu */ dft_near2far(dft_chunk *F, double fmin, double fmax, int Nf, double eps, double mu); dft_near2far(const dft_near2far &f); /* return an array (Ex,Ey,Ez,Hx,Hy,Hz) x Nfreq of the far fields at x */ std::complex *farfield(const vec &x); /* like farfield, but requires F to be Nfreq*6 preallocated array, and does *not* perform the reduction over processes...an MPI allreduce summation by the caller is required to get the final result ... used by other output routine to efficiently get far field on a grid of pts */ void farfield_lowlevel(std::complex *F, const vec &x); /* output far fields on a grid to an HDF5 file */ void save_farfields(const char *fname, const char *prefix, const volume &where, double resolution); void save_hdf5(h5file *file, const char *dprefix = 0); void load_hdf5(h5file *file, const char *dprefix = 0); void operator-=(const dft_near2far &fl); void save_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void load_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void scale_dfts(std::complex scale); void remove(); double freq_min, dfreq; int Nfreq; dft_chunk *F; double eps, mu; }; /* Class to compute local-density-of-states spectra: the power spectrum P(omega) of the work done by the sources. Specialized to handle only the case where all sources have the same time dependence, which greatly simplifies things because then we can do the spatial integral of E*J *first* and then do the Fourier transform, eliminating the need to store the Fourier transform per point or per current. */ class dft_ldos { public: dft_ldos(double freq_min, double freq_max, int Nfreq); ~dft_ldos() { delete[] Fdft; delete[] Jdft; } void update(fields &f); // to be called after each timestep double *ldos() const; // returns array of Nomega values (after last timestep) std::complex *F() const; // returns Fdft std::complex *J() const; // returns Jdft private: std::complex *Fdft; // Nomega array of field * J*(x) DFT values std::complex *Jdft; // Nomega array of J(t) DFT values double Jsum; // sum of |J| over all points public: double omega_min, domega; int Nomega; }; enum in_or_out { Incoming=0, Outgoing }; enum connect_phase { CONNECT_PHASE = 0, CONNECT_NEGATE=1, CONNECT_COPY=2 }; // data for each susceptibility typedef struct polarization_state_s { void *data; // internal polarization data for the susceptibility const susceptibility *s; struct polarization_state_s *next; // linked list } polarization_state; class fields_chunk { public: realnum *f[NUM_FIELD_COMPONENTS][2]; // fields at current time // auxiliary fields needed for PML (at least in some components) realnum *f_u[NUM_FIELD_COMPONENTS][2]; // integrated from D/B realnum *f_w[NUM_FIELD_COMPONENTS][2]; // E/H integrated from these realnum *f_cond[NUM_FIELD_COMPONENTS][2]; // aux field for PML+conductivity /* sometimes, to synchronize the E and H fields, e.g. for computing flux at a given time, we need to timestep H by 1/2; in this case we save backup copies of (some of) the fields to resume timestepping */ realnum *f_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_u_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_w_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_cond_backup[NUM_FIELD_COMPONENTS][2]; // W (or E/H) field from prev. timestep, only stored if needed by update_pols realnum *f_w_prev[NUM_FIELD_COMPONENTS][2]; // used to store D-P and B-P, e.g. when P implements dispersive media realnum *f_minus_p[NUM_FIELD_COMPONENTS][2]; realnum *f_rderiv_int; // cache of helper field for 1/r d(rf)/dr derivative dft_chunk *dft_chunks; realnum **zeroes[NUM_FIELD_TYPES]; // Holds pointers to metal points. int num_zeroes[NUM_FIELD_TYPES]; realnum **connections[NUM_FIELD_TYPES][CONNECT_COPY+1][Outgoing+1]; int num_connections[NUM_FIELD_TYPES][CONNECT_COPY+1][Outgoing+1]; std::complex *connection_phases[NUM_FIELD_TYPES]; int npol[NUM_FIELD_TYPES]; // only E_stuff and H_stuff are used polarization_state *pol[NUM_FIELD_TYPES]; // array of npol[i] polarization_state structures double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a grid_volume gv; volume v; double m; // angular dependence in cyl. coords bool zero_fields_near_cylorigin; // fields=0 m pixels near r=0 for stability double beta; int is_real; bandsdata *bands; src_vol *sources[NUM_FIELD_TYPES]; structure_chunk *new_s; structure_chunk *s; const char *outdir; fields_chunk(structure_chunk *, const char *outdir, double m, double beta, bool zero_fields_near_cylorigin); fields_chunk(const fields_chunk &); ~fields_chunk(); // step.cpp double peek_field(component, const vec &); void use_real_fields(); bool have_component(component c, bool is_complex = false) { switch (c) { case Dielectric: case Permeability: return !is_complex; default: return (f[c][0] && f[c][is_complex]); } } double last_source_time(); // monitor.cpp std::complex get_field(component, const ivec &) const; // for non-collective interpolation: volume get_field_gv(component) const; std::complex get_field(component, const vec &) const; double get_chi1inv(component, direction, const ivec &iloc) const; void backup_component(component c); void average_with_backup(component c); void restore_component(component c); void set_output_directory(const char *name); void verbose(int gv=1) { verbosity = gv; } double count_volume(component); friend class fields; int n_proc() const { return s->n_proc(); }; int is_mine() const { return s->is_mine(); }; // boundaries.cpp void zero_metal(field_type); bool needs_W_notowned(component c); // fields.cpp void remove_sources(); void remove_susceptibilities(); void zero_fields(); // update_eh.cpp bool needs_W_prev(component c) const; bool update_eh(field_type ft, bool skip_w_components = false); bool alloc_f(component c); void figure_out_step_plan(); void set_solve_cw_omega(std::complex omega) { doing_solve_cw = true; solve_cw_omega = omega; } void unset_solve_cw_omega() { doing_solve_cw = false; solve_cw_omega = 0.0; } private: // we set a flag during cw_solve to replace some // time-dependent stuff with the analogous frequency-domain operation bool doing_solve_cw; // true when inside solve_cw std::complex solve_cw_omega; // current omega for solve_cw int verbosity; // Turn on verbosity for debugging purposes... // fields.cpp bool have_plus_deriv[NUM_FIELD_COMPONENTS], have_minus_deriv[NUM_FIELD_COMPONENTS]; component plus_component[NUM_FIELD_COMPONENTS], minus_component[NUM_FIELD_COMPONENTS]; direction plus_deriv_direction[NUM_FIELD_COMPONENTS], minus_deriv_direction[NUM_FIELD_COMPONENTS]; // bands.cpp void record_bands(int tcount); // step.cpp void phase_in_material(structure_chunk *s); void phase_material(int phasein_time); bool step_db(field_type ft); void step_source(field_type ft, bool including_integrated); bool update_pols(field_type ft); void calc_sources(double time); // initialize.cpp void initialize_field(component, std::complex f(const vec &)); void initialize_with_nth_te(int n, double kz); void initialize_with_nth_tm(int n, double kz); // boundaries.cpp void alloc_extra_connections(field_type, connect_phase, in_or_out, int); // dft.cpp void update_dfts(double timeE, double timeH); void changing_structure(); }; enum boundary_condition { Periodic=0, Metallic, Magnetic, None }; enum time_sink { Connecting, Stepping, Boundaries, MpiTime, FieldOutput, FourierTransforming, Other }; typedef void (*field_chunkloop)(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, std::complex shift_phase, const symmetry &S, int sn, void *chunkloop_data); typedef std::complex (*field_function)(const std::complex *fields, const vec &loc, void *integrand_data_); typedef double (*field_rfunction)(const std::complex *fields, const vec &loc, void *integrand_data_); field_rfunction derived_component_func(derived_component c, const grid_volume &gv, int &nfields, component cs[12]); class fields { public: int num_chunks; fields_chunk **chunks; src_time *sources; flux_vol *fluxes; symmetry S; // The following is an array that is num_chunks by num_chunks. Actually // it is two arrays, one for the imaginary and one for the real part. realnum **comm_blocks[NUM_FIELD_TYPES]; // This is the same size as each comm_blocks array, and store the sizes // of the comm blocks themselves for each connection-phase type int *comm_sizes[NUM_FIELD_TYPES][CONNECT_COPY+1]; int comm_size_tot(int f, int pair) const { int sum = 0; for (int ip=0; ip<3; ++ip) sum+=comm_sizes[f][ip][pair]; return sum; } double a, dt; // The resolution a and timestep dt=Courant/a grid_volume gv, user_volume; volume v; double m; double beta; int t, phasein_time, is_real; std::complex k[5], eikna[5]; double coskna[5], sinkna[5]; boundary_condition boundaries[2][5]; bandsdata *bands; char *outdir; // fields.cpp methods: fields(structure *, double m=0, double beta=0, bool zero_fields_near_cylorigin=true); fields(const fields &); ~fields(); bool equal_layout(const fields &f) const; void use_real_fields(); void zero_fields(); void remove_sources(); void remove_susceptibilities(); void remove_fluxes(); void reset(); // time.cpp double time_spent_on(time_sink); void print_times(); // boundaries.cpp void set_boundary(boundary_side,direction,boundary_condition); void use_bloch(direction d, double k) { use_bloch(d, (std::complex) k); } void use_bloch(direction, std::complex kz); void use_bloch(const vec &k); vec lattice_vector(direction) const; // update_eh.cpp void update_eh(field_type ft, bool skip_w_components = false); volume total_volume(void) const; // h5fields.cpp: // low-level function: void output_hdf5(h5file *file, const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, int reim, const volume &where, bool append_data = false, bool single_precision = false); // higher-level functions void output_hdf5(const char *dataname, // OUTPUT COMPLEX-VALUED FUNCTION int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0, bool real_part_only = false); void output_hdf5(const char *dataname, // OUTPUT REAL-VALUED FUNCTION int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); void output_hdf5(component c, // OUTPUT FIELD COMPONENT (or Dielectric) const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); void output_hdf5(derived_component c, // OUTPUT DERIVED FIELD COMPONENT const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); h5file *open_h5file(const char *name, h5file::access_mode mode = h5file::WRITE, const char *prefix = NULL, bool timestamp = false); const char *h5file_name(const char *name, const char *prefix = NULL, bool timestamp = false); // step.cpp methods: double last_step_output_wall_time; int last_step_output_t; void step(); // when comparing times, e.g. for source cutoffs, it // is useful to round to float to avoid gratuitous sensitivity // to floating-point roundoff error inline double round_time() const { return float(t*dt); }; inline double time() const { return t*dt; }; // cw_fields.cpp: bool solve_cw(double tol, int maxiters, std::complex frequency, int L=2); bool solve_cw(double tol = 1e-8, int maxiters = 10000, int L=2); // sources.cpp: double last_source_time(); void add_point_source(component c, double freq, double width, double peaktime, double cutoff, const vec &, std::complex amp = 1.0, int is_continuous = 0); void add_point_source(component c, const src_time &src, const vec &, std::complex amp = 1.0); void add_volume_source(component c, const src_time &src, const volume &, std::complex A(const vec &), std::complex amp = 1.0); void add_volume_source(component c, const src_time &src, const volume &, std::complex amp = 1.0); void require_component(component c); // mpb.cpp void add_eigenmode_source(component c, const src_time &src, direction d, const volume &where, const volume &eig_vol, int band_num, const vec &kpoint, bool match_frequency, int parity, double eig_resolution, double eigensolver_tol, std::complex amp, std::complex A(const vec &) = 0); // initialize.cpp: void initialize_field(component, std::complex f(const vec &)); void initialize_with_nth_te(int n); void initialize_with_nth_tm(int n); void initialize_with_n_te(int n); void initialize_with_n_tm(int n); int phase_in_material(const structure *s, double time); int is_phasing(); // loop_in_chunks.cpp void loop_in_chunks(field_chunkloop chunkloop, void *chunkloop_data, const volume &where, component cgrid = Centered, bool use_symmetry = true, bool snap_unit_dims = false); // integrate.cpp std::complex integrate(int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, double *maxabs = 0); double integrate(int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, double *maxabs = 0); std::complex integrate2(const fields &fields2, int num_fields1, const component *components1, int num_fields2, const component *components2, field_function integrand, void *integrand_data_, const volume &where, double *maxabs = 0); double integrate2(const fields &fields2, int num_fields1, const component *components1, int num_fields2, const component *components2, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs = 0); double max_abs(int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where); double max_abs(int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where); double max_abs(int c, const volume &where); double max_abs(component c, const volume &where); double max_abs(derived_component c, const volume &where); // dft.cpp dft_chunk *add_dft(component c, const volume &where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights = true, std::complex weight = 1.0, dft_chunk *chunk_next = 0, bool sqrt_dV_and_interp_weights = false, std::complex extra_weight = 1.0, bool use_centered_grid = true, int vc = 0); dft_chunk *add_dft_pt(component c, const vec &where, double freq_min, double freq_max, int Nfreq); dft_chunk *add_dft(const volume_list *where, double freq_min, double freq_max, int Nfreq, bool include_dV = true); void update_dfts(); dft_flux add_dft_flux(direction d, const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux_box(const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux_plane(const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux(const volume_list *where, double freq_min, double freq_max, int Nfreq); // stress.cpp dft_force add_dft_force(const volume_list *where, double freq_min, double freq_max, int Nfreq); // near2far.cpp dft_near2far add_dft_near2far(const volume_list *where, double freq_min, double freq_max, int Nfreq); // monitor.cpp double get_chi1inv(component, direction, const vec &loc) const; double get_inveps(component c, direction d, const vec &loc) const { return get_chi1inv(c, d, loc); } double get_eps(const vec &loc) const; double get_mu(const vec &loc) const; void get_point(monitor_point *p, const vec &) const; monitor_point *get_new_point(const vec &, monitor_point *p=NULL) const; void prepare_for_bands(const vec &, double end_time, double fmax=0, double qmin=1e300, double frac_pow_min=0.0); void record_bands(); std::complex get_band(int n, int maxbands=100); void grace_bands(grace *, int maxbands=100); void output_bands(FILE *, const char *, int maxbands=100); std::complex get_field(int c, const vec &loc) const; std::complex get_field(component c, const vec &loc) const; double get_field(derived_component c, const vec &loc) const; // energy_and_flux.cpp void synchronize_magnetic_fields(); void restore_magnetic_fields(); double energy_in_box(const volume &); double electric_energy_in_box(const volume &); double magnetic_energy_in_box(const volume &); double thermo_energy_in_box(const volume &); double total_energy(); double field_energy_in_box(const volume &); double field_energy_in_box(component c, const volume &); double field_energy(); double flux_in_box_wrongH(direction d, const volume &); double flux_in_box(direction d, const volume &); flux_vol *add_flux_vol(direction d, const volume &where); flux_vol *add_flux_plane(const volume &where); flux_vol *add_flux_plane(const vec &p1, const vec &p2); double electric_energy_max_in_box(const volume &where); double modal_volume_in_box(const volume &where); double electric_sqr_weighted_integral(double (*deps)(const vec &), const volume &where); double electric_energy_weighted_integral(double (*f)(const vec &), const volume &where); void set_output_directory(const char *name); void verbose(int gv=1); double count_volume(component); // fields.cpp bool have_component(component); // material.cpp double max_eps() const; // step.cpp void step_boundaries(field_type); bool nosize_direction(direction d) const; direction normal_direction(const volume &where) const; // casimir.cpp std::complex casimir_stress_dct_integral(direction dforce, direction dsource, double mx, double my, double mz, field_type ft, volume where, bool is_bloch = false); void set_solve_cw_omega(std::complex omega); void unset_solve_cw_omega(); private: int verbosity; // Turn on verbosity for debugging purposes... int synchronized_magnetic_fields; // count number of nested synchs double last_wall_time; #define MEEP_TIMING_STACK_SZ 10 time_sink working_on, was_working_on[MEEP_TIMING_STACK_SZ]; double times_spent[Other+1]; // fields.cpp void figure_out_step_plan(); // time.cpp void am_now_working_on(time_sink); void finished_working(); // boundaries.cpp bool chunk_connections_valid; void find_metals(); void disconnect_chunks(); void connect_chunks(); void connect_the_chunks(); // Intended to be ultra-private... bool on_metal_boundary(const ivec &); ivec ilattice_vector(direction) const; bool locate_point_in_user_volume(ivec *, std::complex *phase) const; void locate_volume_source_in_user_volume(const vec p1, const vec p2, vec newp1[8], vec newp2[8], std::complex kphase[8], int &ncopies) const; // mympi.cpp void boundary_communications(field_type); // step.cpp void phase_material(); void step_db(field_type ft); void step_source(field_type ft, bool including_integrated = false); void update_pols(field_type ft); void calc_sources(double tim); int cluster_some_bands_cleverly(double *tf, double *td, std::complex *ta, int num_freqs, int fields_considered, int maxbands, std::complex *fad, double *approx_power); void out_bands(FILE *, const char *, int maxbands); std::complex *clever_cluster_bands(int maxbands, double *approx_power = NULL); public: // monitor.cpp std::complex get_field(component c, const ivec &iloc) const; double get_chi1inv(component, direction, const ivec &iloc) const; // boundaries.cpp bool locate_component_point(component *, ivec *, std::complex *) const; }; class flux_vol { public: flux_vol(fields *f_, direction d_, const volume &where_) : where(where_) { f = f_; d = d_; cur_flux = cur_flux_half = 0; next = f->fluxes; f->fluxes = this; } ~flux_vol() { delete next; } void update_half() { cur_flux_half = flux_wrongE(); if (next) next->update_half(); } void update() { cur_flux = (flux_wrongE() + cur_flux_half) * 0.5; if (next) next->update(); } double flux() { return cur_flux; } flux_vol *next; private: double flux_wrongE() { return f->flux_in_box_wrongH(d, where); } fields *f; direction d; volume where; double cur_flux, cur_flux_half; }; class grace_point; enum grace_type { XY, ERROR_BARS }; class grace { public: grace(const char *fname, const char *dirname = "."); ~grace(); void new_set(grace_type t = XY); void new_curve(); void set_legend(const char *); void set_range(double xmin, double xmax, double ymin, double ymax); void output_point(double x, double y, double dy = -1.0, double extra = -1.0); void output_out_of_order(int n, double x, double y, double dy = -1.0, double extra= -1.0); private: void flush_pts(); FILE *f; char *fn, *dn; grace_point *pts; int set_num,sn; }; // The following is a utility function to parse the executable name use it // to come up with a directory name, avoiding overwriting any existing // directory, unless the source file hasn't changed. const char *make_output_directory(const char *exename, const char *jobname = NULL); void trash_output_directory(const char *dirname); FILE *create_output_file(const char *dirname, const char *fname); // The following allows you to hit ctrl-C to tell your calculation to stop // and clean up. void deal_with_ctrl_c(int stop_now = 2); // When a ctrl_c is called, the following variable (which starts with a // zero value) is incremented. extern int interrupt; int do_harminv(std::complex *data, int n, double dt, double fmin, double fmax, int maxbands, std::complex *amps, double *freq_re, double *freq_im, double *errors = NULL, double spectral_density = 1.1, double Q_thresh = 50, double rel_err_thresh = 1e20, double err_thresh = 0.01, double rel_amp_thresh = -1, double amp_thresh = -1); std::complex *make_casimir_gfunc(double T, double dt, double sigma, field_type ft, std::complex (*eps_func)(std::complex omega) = 0, double Tfft = 0); std::complex *make_casimir_gfunc_kz(double T, double dt, double sigma, field_type ft); #if MEEP_SINGLE // in mympi.cpp ... must be here in order to use realnum type void broadcast(int from, realnum *data, int size); #endif // random number generation: random.cpp void set_random_seed(unsigned long seed); double uniform_random(double a, double b); // uniform random in [a,b] double gaussian_random(double mean, double stddev); // normal random with given mean and stddev int random_int(int a, int b); // uniform random in [a,b) // Bessel function (in initialize.cpp) double BesselJ(int m, double kr); // analytical Green's functions (in near2far.cpp); upon return, // EH[0..5] are set to the Ex,Ey,Ez,Hx,Hy,Hz field components at x // from a c0 source of amplitude f0 at x0. void green2d(std::complex *EH, const vec &x, double freq, double eps, double mu, const vec &x0, component c0, std::complex f0); void green3d(std::complex *EH, const vec &x, double freq, double eps, double mu, const vec &x0, component c0, std::complex f0); } /* namespace meep */ #endif /* MEEP_H */ meep-1.3/src/step.cpp0000644000175400001440000001747712506540456011521 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define RESTRICT using namespace std; namespace meep { void fields::step() { // however many times the fields have been synched, we want to restore now int save_synchronized_magnetic_fields = synchronized_magnetic_fields; if (synchronized_magnetic_fields) { synchronized_magnetic_fields = 1; // reset synchronization count restore_magnetic_fields(); } am_now_working_on(Stepping); if (!t) { last_step_output_wall_time = wall_time(); last_step_output_t = t; } if (!quiet && wall_time() > last_step_output_wall_time + MIN_OUTPUT_TIME) { master_printf("on time step %d (time=%g), %g s/step\n", t, time(), (wall_time() - last_step_output_wall_time) / (t - last_step_output_t)); if (save_synchronized_magnetic_fields) master_printf(" (doing expensive timestepping of synched fields)\n"); last_step_output_wall_time = wall_time(); last_step_output_t = t; } phase_material(); // update cached conductivity-inverse array, if needed for (int i=0;is->update_condinv(); calc_sources(time()); // for B sources step_db(B_stuff); step_source(B_stuff); step_boundaries(B_stuff); calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); step_boundaries(WH_stuff); update_pols(H_stuff); step_boundaries(PH_stuff); step_boundaries(H_stuff); if (fluxes) fluxes->update_half(); calc_sources(time() + 0.5*dt); // for D sources step_db(D_stuff); step_source(D_stuff); step_boundaries(D_stuff); calc_sources(time() + dt); // for integrated E sources update_eh(E_stuff); step_boundaries(WE_stuff); update_pols(E_stuff); step_boundaries(PE_stuff); step_boundaries(E_stuff); if (fluxes) fluxes->update(); t += 1; update_dfts(); finished_working(); // re-synch magnetic fields if they were previously synchronized if (save_synchronized_magnetic_fields) { synchronize_magnetic_fields(); synchronized_magnetic_fields = save_synchronized_magnetic_fields; } } double fields_chunk::peek_field(component c, const vec &where) { double w[8]; ivec ilocs[8]; gv.interpolate(c,where, ilocs, w); if (gv.contains(ilocs[0]) && f[c][0]) { double hello = 0.0; if (is_mine()) hello = f[c][0][gv.index(c,ilocs[0])]; broadcast(n_proc(), &hello, 1); return hello; } //abort("Got no such %s field at %g %g!\n", // component_name(c), gv[ilocs[0]].x(), gv[ilocs[0]].y()); return 0.0; } void fields::phase_material() { bool changed = false; if (is_phasing()) { for (int i=0;iis_mine()) { chunks[i]->phase_material(phasein_time); changed = changed || chunks[i]->new_s; } phasein_time--; } if (or_to_all(changed)) { calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); // ensure H = 1/mu * B step_boundaries(H_stuff); calc_sources(time() + dt); // for integrated E sources update_eh(E_stuff); // ensure E = 1/eps * D step_boundaries(E_stuff); } } void fields_chunk::phase_material(int phasein_time) { if (new_s && phasein_time > 0) { changing_structure(); s->mix_with(new_s, 1.0/phasein_time); } } void fields::step_boundaries(field_type ft) { connect_chunks(); // re-connect if !chunk_connections_valid am_now_working_on(MpiTime); // Do the metals first! for (int i=0;iis_mine()) chunks[i]->zero_metal(ft); /* Note that the copying of data to/from buffers is order-sensitive, and must be kept consistent with the code in boundaries.cpp. In particular, we require that boundaries.cpp set up the connections array so that all of the connections for process i come before all of the connections for process i' for i < i' */ // First copy outgoing data to buffers... for (int j=0;jis_mine()) { int wh[3] = {0,0,0}; for (int i=0;iconnections[ft][ip][Outgoing][wh[ip]++]); n0 += comm_sizes[ft][ip][pair]; } } } boundary_communications(ft); // Finally, copy incoming data to the fields themselves, multiplying phases: for (int i=0;iis_mine()) { int wh[3] = {0,0,0}; for (int j=0;jconnection_phases[ft][wh[ip]/2]); const double phi = imag(chunks[i]->connection_phases[ft][wh[ip]/2]); *(chunks[i]->connections[ft][ip][Incoming][wh[ip]]) = phr*comm_blocks[ft][pair][n] - phi*comm_blocks[ft][pair][n+1]; *(chunks[i]->connections[ft][ip][Incoming][wh[ip]+1]) = phr*comm_blocks[ft][pair][n+1] + phi*comm_blocks[ft][pair][n]; } int n0 = comm_sizes[ft][ip][pair]; ip = CONNECT_NEGATE; for (int n = 0; n < comm_sizes[ft][ip][pair]; ++n) *(chunks[i]->connections[ft][ip][Incoming][wh[ip]++]) = -comm_blocks[ft][pair][n0 + n]; n0 += comm_sizes[ft][ip][pair]; ip = CONNECT_COPY; for (int n = 0; n < comm_sizes[ft][ip][pair]; ++n) *(chunks[i]->connections[ft][ip][Incoming][wh[ip]++]) = comm_blocks[ft][pair][n0 + n]; } } finished_working(); } void fields::step_source(field_type ft, bool including_integrated) { if (ft != D_stuff && ft != B_stuff) abort("only step_source(D/B) is okay"); for (int i=0;iis_mine()) chunks[i]->step_source(ft, including_integrated); } void fields_chunk::step_source(field_type ft, bool including_integrated) { if (doing_solve_cw && !including_integrated) return; for (src_vol *sv = sources[ft]; sv; sv = sv->next) { component c = direction_component(first_field_component(ft), component_direction(sv->c)); const realnum *cndinv = s->condinv[c][component_direction(sv->c)]; if ((including_integrated || !sv->t->is_integrated) && f[c][0] && ((ft == D_stuff && is_electric(sv->c)) || (ft == B_stuff && is_magnetic(sv->c)))) { if (cndinv) for (int j=0; jnpts; j++) { const int i = sv->index[j]; const complex A = sv->current(j) * dt * double(cndinv[i]); f[c][0][i] -= real(A); if (!is_real) f[c][1][i] -= imag(A); } else for (int j=0; jnpts; j++) { const complex A = sv->current(j) * dt; const int i = sv->index[j]; f[c][0][i] -= real(A); if (!is_real) f[c][1][i] -= imag(A); } } } } void fields::calc_sources(double tim) { for (src_time *s = sources; s; s = s->next) s->update(tim, dt); for (int i=0;iis_mine()) chunks[i]->calc_sources(tim); } void fields_chunk::calc_sources(double time) { (void) time; // unused; } } // namespace meep meep-1.3/src/loop_in_chunks.cpp0000644000175400001440000004454012506540456013547 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" /* This file contains a generic function for looping over all of the points in all of the chunks that intersect some given grid_volume. This is used for everything from HDF5 output to applying source volumes to integrating energy and flux. It's fairly tricky because of the parallelization, arbitrary chunk divisions, symmetries, and periodic boundary conditions, but at least all of the trickiness is in one place. It is designed so that the inner loops over the actual grid points can be tight and fast (using the LOOP_OVER_IVECS macro). Many of the loops over chunks involve some sort of integration-like computation, and so we also perform the additional task of calculating the integration weights for each point -- mainly, this involves weighting the boundary points appropriately so that the sum approximates (via linear interpolation) a continuous integral over the supplied grid_volume. */ /**************************************************************************** Integration Weights We want the integral from a to b, assuming linear interpolation of fn (function values on grid points n). Most interior points have weight 1, but the points just inside and outside the boundaries have different weights. Call the weights for the points just *outside* the starting and ending boundaries s0 and e0, respectively, and weights for the points just *inside* the boundaries s1 and e1. Then we have to handle the following cases: 1) a and b separated by at least 2 grid points, e.g.: x | x x x | x 0 a 1 2 3 b 4 first segment: f(x) = f0 (1 - x) + f1 x -- \int_a^1 f(x) dx = f0 (1 - a)^2/2 + f1 (1 - a^2) / 2 last segment: f(x) = f3 (4 - x) + f4 (x - 3) -- \int_3^b f(x) dx = f3 [1 - (4-b)^2] / 2 + f4 (b - 3)^2 / 2 integral = f0 (1 - a)^2/2 <---- f0 s0 + f1 (1 - a^2/2) <---- f1 s1 + f2 + f3 (1 - (4-b)^2 / 2) <---- f3 e1 + f4 (b - 3)^2 / 2 <---- f4 e0 In terms of starting and ending weights: w0 = 1 - a w1 = b - 3 s0 = w0^2 / 2 s1 = 1 - (1 - w0)^2 / 2 e0 = w1^2 / 2 e1 = 1 - (1 - w1)^2 / 2 2) one grid point between a and b. x | x | x 0 a 1 b 2 integral = f0 (1 - a)^2 / 2 + f1 [(1 - a^2) + 1 - (2 - b)^2] / 2 + f3 (b - 1)^2 / 2 s0 = w0^2 / 2 e0 = w1^2 / 2 s1 = e1 = 1 - (1 - w0)^2 / 2 - (1 - w1)^2 / 2 3) no grid points between a and b. x | | x 0 a b 1 integral = f0 [ (1-a)^2 - (1-b)^2 ] / 2 + f1 [ b^2 - a^2 ] / 2 = f0 [ w0^2 - (1-w1)^2 ] / 2 + f1 [ w1^2 - (1-w0)^2 ] / 2 s0 = e1 = w0^2/2 - (1-w1)^2/2 e0 = s1 = w1^2/2 - (1-w0)^2/2 4) as (3), but a = b: interpolation, not integration: -- want: f0 * w0 + f1 * w1 s0 = w0 e0 = w1 = 1 - w0 -------------- Integration Weights in Cylindrical Coordinates FIXME: implement this below? Ideally, we should have different weights for the R direction of cylindrical coordinates, i.e. for integrating f(r) r dr, because again we want to perfectly integrate any linear f(r). Thus, the integration weights will depend upon r. Note, however, that we also have an r in the dV, so we will have to divide the weights by this factor. 1) a and b separated by at least 2 grid points, e.g.: x | x x x | x i a i+1 i+2 i+3 b i+4 (where r = i * inva). linear interpolation in [i,i+1): f(x) = f_i (i+1 - x) + f_{i+1} (x-i) want: \int_a^b f(x) x dx in terms of starting and ending weights: w0 = (i+1) - a w1 = b - (i+3) integral = f_i [-w0^3 / 3 + (i+1) w0^2 / 2] <- s0 i + f_{j=i+1} [w0^3 / 3 - (j+1) w0^2 / 2 + j w0 + j/2 + 1/6] <- s1 (i+1) + f_{j=i+2} j <- 1 (i+2) + f_{j=i+3} [-w1^3 / 3 - (j-1) w1^2 / 2 + j w1 + j/2 - 1/6] <- e1 (i+3) + f_{j=i+4} [w1^3 / 3 + (j-1) w1^2 / 2] <- e0 (i+4) (thanks to Maple for doing the annoying algebra) (yes, I have tested that it correctly integrates linear f(r)) Note that the coefficients need to be divided by i, i+1, etcetera to get s0, s1, etcetera; this gives an interior-point weight of 1 as before. For i->infinity, this should converge to the weights from before. Avoiding division by zero is more tricky, because the weight at j=0 is not necessarily zero, due to the interpolation. It might be better to pre-include the dV in the weight for edge elements, with appropriate logic in the IVEC_LOOP_WEIGHT macro. Tricky. The above is also not correct for integrals that cross x=0, because it should really be the integral of f(x) |x|. Even interior points probably need special handling in that case. For sanity, we would just divide the integration region into positive and negative r and integrate them separately somehow. Grrr. 2) one grid point between a and b. x | x | x i a i+1 b i+2 integral = f_i [-w0^3 / 3 + (i+1) w0^2 / 2] <- s0 i + f_{j=i+1} [w0^3 / 3 - (j+1) w0^2 / 2 + j w0 + -w1^3 / 3 - (j-1) w1^2 / 2 + j w1] <- {s1,e1} (i+1) + f_{j=i+2} [w1^3 / 3 + (j-1) w1^2 / 2] <- e0 (i+2) 3) no grid points between a and b. x | | x i a b i+1 integral = f_i [-w0^3/3 + (i+1) w0^2/2 + -w1^3/3 - (i-1) w1^2/2 + i w1 - i/2 - 1/6] <- s0 i + f_{j=i+1} [ w0^3/3 - (j+1) w0^2/2 + j w0 + w1^3/3 + (j-1) w1^2/2 - j/2 + 1/6] <- e0 (i+1) 4) as (3), but a = b: interpolation, not integration: same as above ****************************************************************************/ using namespace std; namespace meep { /* The following two functions convert a vec to the nearest ivec in the dielectric (odd-coordinate) grid, either rounding down (floor) or up (ceil). In the special case where a component of the vec is *exactly* on a component of the ivec, we add the corresponding component of equal_shift (which should be either -2, 0, or +2). (equal_shift is there to prevent us from counting edge points twice.) */ static ivec vec2diel_floor(const vec &pt, double a, const ivec &equal_shift) { ivec ipt(pt.dim); LOOP_OVER_DIRECTIONS(pt.dim, d) { ipt.set_direction(d, 1+2*int(floor(pt.in_direction(d)*a-.5))); if (ipt.in_direction(d) == pt.in_direction(d)) ipt.set_direction(d, ipt.in_direction(d) + equal_shift.in_direction(d)); } return ipt; } static ivec vec2diel_ceil(const vec &pt, double a, const ivec &equal_shift) { ivec ipt(pt.dim); LOOP_OVER_DIRECTIONS(pt.dim, d) { ipt.set_direction(d, 1+2*int(ceil(pt.in_direction(d)*a-.5))); if (ipt.in_direction(d) == pt.in_direction(d)) ipt.set_direction(d, ipt.in_direction(d) + equal_shift.in_direction(d)); } return ipt; } static inline int iabs(int i) { return (i < 0 ? -i : i); } /* Generic function for computing loops within the chunks, often integral-like things, over a grid_volume WHERE. The job of this function is to call CHUNKLOOP() for each chunk that intersects WHERE, passing it the chunk, the range of integer coordinates to loop over, the integration weights for the boundary points, and the bloch phase shift, translational shift, and symmetry operation to transform the chunk to the actual integration location. (N.B. we apply the symmetry first to the chunk, *then* the shift.) We also pass CHUNKLOOP() dV0 and dV1, such that the integration "grid_volume" dV is dV0 + dV1 * iloopR, where iloopR is the loop variable (starting from 0 at the starting integer coord and incrementing by 1) corresponding to the direction R. Note that, in the LOOP_OVER_IVECS macro, iloopR corresponds to the loop variable loop_i2 in Dcyl (cylindrical coordinates). In other coordinates, dV1 is 0. Note also that by "grid_volume" dV we mean the integration unit corresponding to the dimensionality of WHERE (e.g. an area if WHERE is 2d, etc.) In particular, the loop's point coordinates are calculated on the Yee grid for component cgrid. cgrid == Centered is a good choice if you want to work with a combination of multiple field components, because all of the field components can be interpolated onto this grid without communication between chunks. The integration weights are chosen to correspond to integrating the linear interpolation of the function values from these grid points. For a simple example of an chunkloop routine, see the tests/integrate.cpp file. The parameters USE_SYMMETRY (default = true) and SNAP_EMPTY_DIMS (default = false) are for use with not-quite-integration-like operations. If use_symmetry is false, then we do *not* loop over all possible symmetry transformations of the chunks to see if they intersect WHERE; we only use chunks that, untransformed, already intersect the grid_volume. If SNAP_EMPTY_DIMS is true, then for empty (min = max) dimensions of WHERE, instead of interpolating, we "snap" them to the nearest grid point. */ void fields::loop_in_chunks(field_chunkloop chunkloop, void *chunkloop_data, const volume &where, component cgrid, bool use_symmetry, bool snap_empty_dims) { if (coordinate_mismatch(gv.dim, cgrid)) abort("Invalid fields::loop_in_chunks grid type %s for dimensions %s\n", component_name(cgrid), dimension_name(gv.dim)); if (where.dim != gv.dim) abort("Invalid dimensions %d for WHERE in fields::loop_in_chunks", where.dim); if (cgrid == Permeability) cgrid = Centered; /* We handle looping on an arbitrary component grid by shifting to the centered grid and then shifting back. The looping coordinates are internally calculated on the odd-indexed "centered grid", which has the virtue that it is disjoint for each chunk and each chunk has enough information to interpolate all of its field components onto this grid without communication. Another virtue of this grid is that it is invariant under all of our symmetry transformations, so we can uniquely decide which transformed chunk gets to loop_in_chunks which grid point. */ vec yee_c(gv.yee_shift(Centered) - gv.yee_shift(cgrid)); ivec iyee_c(gv.iyee_shift(Centered) - gv.iyee_shift(cgrid)); volume wherec(where + yee_c); /* Find the corners (is and ie) of the smallest bounding box for wherec, on the grid of odd-coordinate ivecs (i.e. the "epsilon grid"). */ ivec is(vec2diel_floor(wherec.get_min_corner(), gv.a, zero_ivec(gv.dim))); ivec ie(vec2diel_ceil(wherec.get_max_corner(), gv.a, zero_ivec(gv.dim))); /* Integration weights at boundaries (c.f. long comment at top). */ vec s0(gv.dim), e0(gv.dim), s1(gv.dim), e1(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { double w0, w1; w0 = 1. - wherec.in_direction_min(d)*gv.a + 0.5*is.in_direction(d); w1 = 1. + wherec.in_direction_max(d)*gv.a - 0.5*ie.in_direction(d); if (ie.in_direction(d) >= is.in_direction(d) + 3*2) { s0.set_direction(d, w0*w0 / 2); s1.set_direction(d, 1 - (1-w0)*(1-w0) / 2); e0.set_direction(d, w1*w1 / 2); e1.set_direction(d, 1 - (1-w1)*(1-w1) / 2); } else if (ie.in_direction(d) == is.in_direction(d) + 2*2) { s0.set_direction(d, w0*w0 / 2); s1.set_direction(d, 1 - (1-w0)*(1-w0) / 2 - (1-w1)*(1-w1) / 2); e0.set_direction(d, w1*w1 / 2); e1.set_direction(d, s1.in_direction(d)); } else if (wherec.in_direction_min(d) == wherec.in_direction_max(d)) { if (snap_empty_dims) { if (w0 > w1) ie.set_direction(d, is.in_direction(d)); else is.set_direction(d, ie.in_direction(d)); wherec.set_direction_min(d, is.in_direction(d) * (0.5*gv.inva)); wherec.set_direction_max(d, is.in_direction(d) * (0.5*gv.inva)); w0 = w1 = 1.0; } s0.set_direction(d, w0); s1.set_direction(d, w1); e0.set_direction(d, w1); e1.set_direction(d, w0); } else if (ie.in_direction(d) == is.in_direction(d) + 1*2) { s0.set_direction(d, w0*w0 / 2 - (1-w1)*(1-w1) / 2); e0.set_direction(d, w1*w1 / 2 - (1-w0)*(1-w0) / 2); s1.set_direction(d, e0.in_direction(d)); e1.set_direction(d, s0.in_direction(d)); } else abort("bug: impossible(?) looping boundaries"); } // loop over symmetry transformations of the chunks: for (int sn = 0; sn < (use_symmetry ? S.multiplicity() : 1); ++sn) { component cS = S.transform(cgrid, -sn); ivec iyee_cS(S.transform_unshifted(iyee_c, -sn)); volume gvS = S.transform(gv.surroundings(), sn); vec L(gv.dim); ivec iL(gv.dim); // n.b. we can't just S.transform(lattice_vector,sn), 'cause of signs LOOP_OVER_DIRECTIONS(gv.dim, d) { direction dS = S.transform(d, -sn).d; L.set_direction(d, fabs(lattice_vector(dS).in_direction(dS))); iL.set_direction(d, iabs(ilattice_vector(dS).in_direction(dS))); } // figure out range of lattice shifts for which gvS intersects wherec: ivec min_ishift(gv.dim), max_ishift(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { if (boundaries[High][S.transform(d, -sn).d] == Periodic) { min_ishift.set_direction(d, int(floor((wherec.in_direction_min(d) - gvS.in_direction_max(d)) / L.in_direction(d)))); max_ishift.set_direction(d, int(ceil((wherec.in_direction_max(d) - gvS.in_direction_min(d)) / L.in_direction(d)))); } else { min_ishift.set_direction(d, 0); max_ishift.set_direction(d, 0); } } // loop over lattice shifts ivec ishift(min_ishift); do { complex ph = 1.0; vec shift(gv.dim, 0.0); ivec shifti(gv.dim, 0); LOOP_OVER_DIRECTIONS(gv.dim, d) { shift.set_direction(d, L.in_direction(d) * ishift.in_direction(d)); shifti.set_direction(d, iL.in_direction(d) * ishift.in_direction(d)); ph *= pow(eikna[d], ishift.in_direction(d)); } for (int i = 0; i < num_chunks; ++i) { if (!chunks[i]->is_mine()) continue; // Chunk looping boundaries: volume vS(gv.dim); if (use_symmetry) vS = S.transform(chunks[i]->v, sn); else { /* If we're not using symmetry, it's because (as in src_vol) we don't care about correctly counting the points in the grid_volume. Rather, we just want to make sure to get *all* of the chunk points that intersect where. Hence, add a little padding to make sure we don't miss any points due to rounding. */ vec pad(one_ivec(gv.dim) * gv.inva * 1e-3); vS = volume(chunks[i]->gv.loc(Centered,0) - pad, chunks[i]->gv.loc(Centered, chunks[i]->gv.ntot()-1) +pad); } ivec iscS(max(is-shifti, vec2diel_ceil(vS.get_min_corner(), gv.a, one_ivec(gv.dim) * 2))); ivec iecS(min(ie-shifti, vec2diel_floor(vS.get_max_corner(), gv.a, zero_ivec(gv.dim)))); if (iscS <= iecS) { // Determine weights at chunk looping boundaries: ivec isc(S.transform(iscS, -sn)), iec(S.transform(iecS, -sn)); vec s0c(gv.dim,1.0), s1c(gv.dim,1.0), e0c(gv.dim,1.0), e1c(gv.dim,1.0); iscS += shifti; iecS += shifti; LOOP_OVER_DIRECTIONS(gv.dim, d) { direction dS = S.transform(d, sn).d; if (iscS.in_direction(dS) == is.in_direction(dS)) { s0c.set_direction(d, s0.in_direction(dS)); s1c.set_direction(d, s1.in_direction(dS)); } else if (iscS.in_direction(dS) == is.in_direction(dS) + 2) { s0c.set_direction(d, s1.in_direction(dS)); } if (iecS.in_direction(dS) == ie.in_direction(dS)) { e0c.set_direction(d, e0.in_direction(dS)); e1c.set_direction(d, e1.in_direction(dS)); } else if (iecS.in_direction(dS) == ie.in_direction(dS) - 2) { e0c.set_direction(d, e1.in_direction(dS)); } if (iecS.in_direction(dS) == iscS.in_direction(dS)) { double w = min(s0c.in_direction(d), e0c.in_direction(d)); s0c.set_direction(d, w); e0c.set_direction(d, w); s1c.set_direction(d, w); e1c.set_direction(d, w); } else if (iecS.in_direction(dS) == iscS.in_direction(dS) + 1*2) { double w = min(s0c.in_direction(d), e1c.in_direction(d)); s0c.set_direction(d, w); e1c.set_direction(d, w); w = min(s1c.in_direction(d), e0c.in_direction(d)); s1c.set_direction(d, w); e0c.set_direction(d, w); } else if (iecS.in_direction(dS) == iscS.in_direction(dS) + 2*2) { double w = min(s1c.in_direction(d), e1c.in_direction(d)); s1c.set_direction(d, w); e1c.set_direction(d, w); } // swap endpoints/weights if in wrong order due to S.transform if (isc.in_direction(d) > iec.in_direction(d)) { int iswap = isc.in_direction(d); isc.set_direction(d, iec.in_direction(d)); iec.set_direction(d, iswap); double swap = s0c.in_direction(d); s0c.set_direction(d, e0c.in_direction(d)); e0c.set_direction(d, swap); swap = s1c.in_direction(d); s1c.set_direction(d, e1c.in_direction(d)); e1c.set_direction(d, swap); } } // Determine integration "volumes" dV0 and dV1; double dV0 = 1.0, dV1 = 0.0; LOOP_OVER_DIRECTIONS(gv.dim, d) if (wherec.in_direction(d) > 0.0) dV0 *= gv.inva; if (gv.dim == Dcyl) { dV1 = dV0 * 2*pi * gv.inva; dV0 *= 2*pi * fabs((S.transform(chunks[i]->gv[isc], sn) + shift - yee_c).in_direction(R)); } chunkloop(chunks[i], i, cS, isc - iyee_cS, iec - iyee_cS, s0c, s1c, e0c, e1c, dV0, dV1, shifti, ph, S, sn, chunkloop_data); } } LOOP_OVER_DIRECTIONS(gv.dim, d) { if (ishift.in_direction(d) + 1 <= max_ishift.in_direction(d)) { ishift.set_direction(d, ishift.in_direction(d) + 1); break; } ishift.set_direction(d, min_ishift.in_direction(d)); } } while (ishift != min_ishift); } } } // namespace meep meep-1.3/src/Makefile.in0000644000175400001440000007203412506540651012072 00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = sphere_quad$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(include_HEADERS) $(pkginclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libmeep@MEEP_SUFFIX@_la_LIBADD = am__objects_1 = am__objects_2 = step_generic_stride1.lo am_libmeep@MEEP_SUFFIX@_la_OBJECTS = anisotropic_averaging.lo bands.lo \ boundaries.lo bicgstab.lo casimir.lo control_c.lo cw_fields.lo \ dft.lo dft_ldos.lo energy_and_flux.lo fields.lo \ loop_in_chunks.lo grace.lo h5fields.lo h5file.lo initialize.lo \ integrate.lo integrate2.lo monitor.lo mympi.lo \ multilevel-atom.lo near2far.lo output_directory.lo random.lo \ sources.lo step.lo step_db.lo stress.lo structure.lo \ susceptibility.lo time.lo update_eh.lo mpb.lo update_pols.lo \ vec.lo step_generic.lo $(am__objects_1) $(am__objects_2) libmeep@MEEP_SUFFIX@_la_OBJECTS = \ $(am_libmeep@MEEP_SUFFIX@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmeep@MEEP_SUFFIX@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libmeep@MEEP_SUFFIX@_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_sphere_quad_OBJECTS = sphere-quad.$(OBJEXT) sphere_quad_OBJECTS = $(am_sphere_quad_OBJECTS) sphere_quad_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmeep@MEEP_SUFFIX@_la_SOURCES) $(sphere_quad_SOURCES) DIST_SOURCES = $(libmeep@MEEP_SUFFIX@_la_SOURCES) \ $(sphere_quad_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(include_HEADERS) $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MPIRUN = @MPIRUN@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libmeep@MEEP_SUFFIX@.la include_HEADERS = meep.hpp pkginclude_HEADERS = meep/mympi.hpp meep/vec.hpp AM_CPPFLAGS = -I$(top_srcdir)/src BUILT_SOURCES = sphere-quad.h step_generic_stride1.cpp HDRS = meep.hpp meep_internals.hpp meep/mympi.hpp meep/vec.hpp \ bicgstab.hpp libmeep@MEEP_SUFFIX@_la_SOURCES = anisotropic_averaging.cpp bands.cpp \ boundaries.cpp bicgstab.cpp casimir.cpp control_c.cpp cw_fields.cpp \ dft.cpp dft_ldos.cpp energy_and_flux.cpp fields.cpp loop_in_chunks.cpp \ grace.cpp h5fields.cpp h5file.cpp initialize.cpp integrate.cpp \ integrate2.cpp monitor.cpp mympi.cpp multilevel-atom.cpp near2far.cpp \ output_directory.cpp random.cpp sources.cpp step.cpp step_db.cpp \ stress.cpp structure.cpp susceptibility.cpp time.cpp update_eh.cpp \ mpb.cpp update_pols.cpp vec.cpp step_generic.cpp $(HDRS) \ $(BUILT_SOURCES) libmeep@MEEP_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ PRELUDE = "/* This file was automatically generated --- DO NOT EDIT */" sphere_quad_SOURCES = sphere-quad.cpp SPHERE_QUAD = $(top_builddir)/src/sphere_quad MAINTAINERCLEANFILES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmeep@MEEP_SUFFIX@.la: $(libmeep@MEEP_SUFFIX@_la_OBJECTS) $(libmeep@MEEP_SUFFIX@_la_DEPENDENCIES) $(EXTRA_libmeep@MEEP_SUFFIX@_la_DEPENDENCIES) $(AM_V_CXXLD)$(libmeep@MEEP_SUFFIX@_la_LINK) -rpath $(libdir) $(libmeep@MEEP_SUFFIX@_la_OBJECTS) $(libmeep@MEEP_SUFFIX@_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list sphere_quad$(EXEEXT): $(sphere_quad_OBJECTS) $(sphere_quad_DEPENDENCIES) $(EXTRA_sphere_quad_DEPENDENCIES) @rm -f sphere_quad$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sphere_quad_OBJECTS) $(sphere_quad_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anisotropic_averaging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bicgstab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boundaries.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casimir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cw_fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dft_ldos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/energy_and_flux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loop_in_chunks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multilevel-atom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mympi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/near2far.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_directory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere-quad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_db.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_generic_stride1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/susceptibility.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_eh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_pols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vec.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS sphere-quad.h: make sphere_quad (echo $(PRELUDE); echo; $(SPHERE_QUAD)) > $@ step_generic_stride1.cpp: step_generic.cpp (echo $(PRELUDE); echo; sed 's/LOOP_OVER/S1LOOP_OVER/g' $(top_srcdir)/src/step_generic.cpp | sed 's/step_curl/step_curl_stride1/' | sed 's/step_update_EDHB/step_update_EDHB_stride1/' | sed 's/step_beta/step_beta_stride1/') > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-1.3/src/mpb.cpp0000644000175400001440000003415012506540456011307 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "meep.hpp" #include "config.h" #ifdef HAVE_MPB # include # ifndef SCALAR_COMPLEX # error Meep requires complex version of MPB # endif #endif using namespace std; namespace meep { #ifdef HAVE_MPB typedef struct { const double *s, *o; ndim dim; const fields *f; } meep_mpb_eps_data; static void meep_mpb_eps(symmetric_matrix *eps, symmetric_matrix *eps_inv, const mpb_real r[3], void *eps_data_) { meep_mpb_eps_data *eps_data = (meep_mpb_eps_data *) eps_data_; const double *s = eps_data->s; const double *o = eps_data->o; vec p(eps_data->dim == D3 ? vec(o[0] + r[0] * s[0], o[1] + r[1] * s[1], o[1] + r[1] * s[1]) : (eps_data->dim == D2 ? vec(o[0] + r[0] * s[0], o[1] + r[1] * s[1]) : /* D1 */ vec(o[2] + r[2] * s[2]))); const fields *f = eps_data->f; eps_inv->m00 = f->get_chi1inv(Ex, X, p); eps_inv->m11 = f->get_chi1inv(Ey, Y, p); eps_inv->m22 = f->get_chi1inv(Ez, Z, p); // master_printf("eps_zz(%g,%g) = %g\n", p.x(), p.y(), 1/eps_inv->m00); ASSIGN_ESCALAR(eps_inv->m01, f->get_chi1inv(Ex, Y, p), 0); ASSIGN_ESCALAR(eps_inv->m02, f->get_chi1inv(Ex, Z, p), 0); ASSIGN_ESCALAR(eps_inv->m12, f->get_chi1inv(Ey, Z, p), 0); maxwell_sym_matrix_invert(eps, eps_inv); } static const complex *meep_mpb_A_data = 0; static const int *meep_mpb_A_n = 0; static const double *meep_mpb_A_s = 0; static int meep_mpb_A_component = 0; static vec meep_mpb_A_center; static complex one(const vec &pt) {(void) pt; return 1.0;} static complex (*meep_mpb_A_A)(const vec &) = 0; static complex meep_mpb_A(const vec &p) { const complex *data = meep_mpb_A_data + meep_mpb_A_component; int nx = meep_mpb_A_n[0]; int ny = meep_mpb_A_n[1]; int nz = meep_mpb_A_n[2]; const double *s = meep_mpb_A_s; double r[3] = {0,0,0}; vec p0(p - meep_mpb_A_center); LOOP_OVER_DIRECTIONS(p.dim, d) r[d%3] = p0.in_direction(d) / s[d%3] + 0.5; double rx = r[0], ry = r[1], rz = r[2]; /* linearly interpolate the amplitude from MPB at point p */ int x, y, z, x2, y2, z2; double dx, dy, dz; /* get the point corresponding to r in the epsilon array grid: */ x = int(rx * nx); y = int(ry * ny); z = int(rz * nz); /* get the difference between (x,y,z) and the actual point */ dx = rx * nx - x; dy = ry * ny - y; dz = rz * nz - z; /* get the other closest point in the grid, with periodic boundaries: */ x2 = (nx + (dx >= 0.0 ? x + 1 : x - 1)) % nx; y2 = (ny + (dy >= 0.0 ? y + 1 : y - 1)) % ny; z2 = (nz + (dz >= 0.0 ? z + 1 : z - 1)) % nz; x = x % nx; y = y % ny; z = z % nz; /* take abs(d{xyz}) to get weights for {xyz} and {xyz}2: */ dx = fabs(dx); dy = fabs(dy); dz = fabs(dz); /* define a macro to give us data(x,y,z) on the grid, in row-major order (the order used by MPB): */ #define D(x,y,z) (data[(((x)*ny + (y))*nz + (z)) * 3]) complex ret; ret = (((D(x,y,z)*(1.0-dx) + D(x2,y,z)*dx) * (1.0-dy) + (D(x,y2,z)*(1.0-dx) + D(x2,y2,z)*dx) * dy) * (1.0-dz) + ((D(x,y,z2)*(1.0-dx) + D(x2,y,z2)*dx) * (1.0-dy) + (D(x,y2,z2)*(1.0-dx) + D(x2,y2,z2)*dx) * dy) * dz); #undef D return (complex(double(real(ret)), double(imag(ret))) * meep_mpb_A_A(p)); } #endif /* HAVE_MPB */ void fields::add_eigenmode_source(component c0, const src_time &src, direction d, const volume &where, const volume &eig_vol, int band_num, const vec &kpoint, bool match_frequency, int parity, double resolution, double eigensolver_tol, complex amp, complex A(const vec &)) { #ifdef HAVE_MPB if (resolution <= 0) resolution = 2 * gv.a; // default to twice resolution int n[3], local_N, N_start, alloc_N, mesh_size[3] = {1,1,1}; mpb_real k[3] = {0,0,0}, kcart[3] = {0,0,0}; double s[3] = {0,0,0}, o[3] = {0,0,0}; mpb_real R[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; mpb_real G[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; mpb_real kdir[3] = {0,0,0}; double omega_src = real(src.frequency()), kscale = 1.0; double match_tol = eigensolver_tol * 10; if (d == NO_DIRECTION || coordinate_mismatch(gv.dim, d)) abort("invalid direction in add_eigenmode_source"); if (where.dim != gv.dim || eig_vol.dim != gv.dim) abort("invalid volume dimensionality in add_eigenmode_source"); if (!eig_vol.contains(where)) abort("invalid grid_volume in add_eigenmode_source (WHERE must be in EIG_VOL)"); switch (gv.dim) { case D3: o[0] = eig_vol.in_direction_min(X); o[1] = eig_vol.in_direction_min(Y); o[2] = eig_vol.in_direction_min(Z); s[0] = eig_vol.in_direction(X); s[1] = eig_vol.in_direction(Y); s[2] = eig_vol.in_direction(Z); k[0] = kpoint.in_direction(X); k[1] = kpoint.in_direction(Y); k[2] = kpoint.in_direction(Z); break; case D2: o[0] = eig_vol.in_direction_min(X); o[1] = eig_vol.in_direction_min(Y); s[0] = eig_vol.in_direction(X); s[1] = eig_vol.in_direction(Y); k[0] = kpoint.in_direction(X); k[1] = kpoint.in_direction(Y); break; case D1: o[2] = eig_vol.in_direction_min(Z); s[2] = eig_vol.in_direction(Z); k[2] = kpoint.in_direction(Z); break; default: abort("unsupported dimensionality in add_eigenmode_source"); } master_printf("KPOINT: %g, %g, %g\n", k[0], k[1], k[2]); // if match_frequency is true, all we need is a direction for k // and a crude guess for its value; we must supply this if k==0. if (match_frequency && k[0] == 0 && k[1] == 0 && k[2] == 0) { k[d-X] = omega_src * sqrt(get_eps(eig_vol.center())); master_printf("NEW KPOINT: %g, %g, %g\n", k[0], k[1], k[2]); if (s[d-X] > 0) { k[d-X] *= s[d-X]; // put k in G basis (inverted when we compute kcart) if (fabs(k[d-X]) > 0.4) // ensure k is well inside the Brillouin zone k[d-X] = k[d-X] > 0 ? 0.4 : -0.4; master_printf("NEWER KPOINT: %g, %g, %g\n", k[0], k[1], k[2]); } } for (int i = 0; i < 3; ++i) { n[i] = int(resolution * s[i] + 0.5); if (n[i] == 0) n[i] = 1; R[i][i] = s[i] = s[i] == 0 ? 1 : s[i]; G[i][i] = 1 / R[i][i]; // recip. latt. vectors / 2 pi } for (int i = 0; i < 3; ++i) for (int j = 0; j < 3; ++j) kcart[i] += G[j][i] * k[j]; double klen0 = sqrt(k[0]*k[0]+k[1]*k[1]+k[2]*k[2]); double klen = sqrt(kcart[0]*kcart[0]+kcart[1]*kcart[1]+kcart[2]*kcart[2]); if (klen == 0.0) { if (match_frequency) abort("need nonzero kpoint guess to match frequency"); klen = 1; } kdir[0] = kcart[0] / klen; kdir[1] = kcart[1] / klen; kdir[2] = kcart[2] / klen; maxwell_data *mdata = create_maxwell_data(n[0], n[1], n[2], &local_N, &N_start, &alloc_N, band_num, band_num); if (local_N != n[0] * n[1] * n[2]) abort("MPI version of MPB library not supported"); set_maxwell_data_parity(mdata, parity); update_maxwell_data_k(mdata, k, G[0], G[1], G[2]); if (k[0] == 0 && k[1] == 0 && k[2] == 0) { evectmatrix H; H.p = band_num; H.c = 2; band_num -= maxwell_zero_k_num_const_bands(H, mdata); if (band_num == 0) abort("zero-frequency bands at k=0 are ill-defined"); } meep_mpb_eps_data eps_data; eps_data.s = s; eps_data.o = o; eps_data.dim = gv.dim; eps_data.f = this; set_maxwell_dielectric(mdata, mesh_size, R, G, meep_mpb_eps,NULL, &eps_data); if (check_maxwell_dielectric(mdata, 0)) abort("invalid dielectric function for MPB"); evectmatrix H = create_evectmatrix(n[0] * n[1] * n[2], 2, band_num, local_N, N_start, alloc_N); for (int i = 0; i < H.n * H.p; ++i) { ASSIGN_SCALAR(H.data[i], rand() * 1.0/RAND_MAX, rand() * 1.0/RAND_MAX); } mpb_real *eigvals = new mpb_real[band_num]; int num_iters; evectmatrix W[3]; for (int i = 0; i < 3; ++i) W[i] = create_evectmatrix(n[0] * n[1] * n[2], 2, band_num, local_N, N_start, alloc_N); evectconstraint_chain *constraints = NULL; constraints = evect_add_constraint(constraints, maxwell_parity_constraint, (void *) mdata); if (k[0] == 0 && k[1] == 0 && k[2] == 0) constraints = evect_add_constraint(constraints, maxwell_zero_k_constraint, (void *) mdata); mpb_real knew[3]; for (int i = 0; i < 3; ++i) knew[i] = k[i]; do { eigensolver(H, eigvals, maxwell_operator, (void *) mdata, #if MPB_VERSION_MAJOR > 1 || (MPB_VERSION_MAJOR == 1 && MPB_VERSION_MINOR >= 6) NULL, NULL, /* eventually, we can support mu here */ #endif maxwell_preconditioner2, (void *) mdata, evectconstraint_chain_func, (void *) constraints, W, 3, eigensolver_tol, &num_iters, EIGS_DEFAULT_FLAGS | (am_master() && !quiet ? EIGS_VERBOSE : 0)); if (!quiet) master_printf("MPB solved for omega_%d(%g,%g,%g) = %g after %d iters\n", band_num, knew[0],knew[1],knew[2], sqrt(eigvals[band_num-1]), num_iters); if (match_frequency) { // copy desired single eigenvector into scratch arrays evectmatrix_resize(&W[0], 1, 0); evectmatrix_resize(&W[1], 1, 0); for (int i = 0; i < H.n; ++i) W[0].data[i] = H.data[H.p-1 + i * H.p]; // compute the group velocity in the k direction maxwell_ucross_op(W[0], W[1], mdata, kdir); // W[1] = (dTheta/dk) W[0] mpb_real v, vscratch; // v = Re( W[0]* (dTheta/dk) W[0] ) = g. velocity evectmatrix_XtY_diag_real(W[0], W[1], &v, &vscratch); v /= sqrt(eigvals[band_num - 1]); // return to original size evectmatrix_resize(&W[0], band_num, 0); evectmatrix_resize(&W[1], band_num, 0); // update k via Newton step kscale = kscale - (sqrt(eigvals[band_num - 1]) - omega_src) / (v*klen0); if (!quiet) master_printf("Newton step: group velocity v=%g, kscale=%g\n", v, kscale); if (kscale < 0 || kscale > 100) abort("Newton solver not converging -- need a better starting kpoint"); for (int i = 0; i < 3; ++i) knew[i] = k[i] * kscale; update_maxwell_data_k(mdata, knew, G[0], G[1], G[2]); } } while (match_frequency && fabs(sqrt(eigvals[band_num - 1]) - omega_src) > omega_src * match_tol); evect_destroy_constraints(constraints); for (int i = 0; i < 3; ++i) destroy_evectmatrix(W[i]); src_time *src_mpb = src.clone(); if (!match_frequency) src_mpb->set_frequency(omega_src = sqrt(eigvals[band_num - 1])); complex *cdata = (complex *) mdata->fft_data; meep_mpb_A_s = s; meep_mpb_A_n = n; meep_mpb_A_data = cdata; meep_mpb_A_center = eig_vol.center() - where.center(); meep_mpb_A_A = A ? A : one; maxwell_compute_h_from_H(mdata, H, (scalar_complex*)cdata, band_num - 1, 1); /* choose deterministic phase, maximizing power in real part; see fix_field_phase routine in MPB.*/ { int i, N = mdata->fft_output_size * 3; double sq_sum0 = 0, sq_sum1 = 0, maxabs = 0.0; double theta; for (i = 0; i < N; ++i) { double a = real(cdata[i]), b = imag(cdata[i]); sq_sum0 += a*a - b*b; sq_sum1 += 2*a*b; } theta = 0.5 * atan2(-sq_sum1, sq_sum0); complex phase(cos(theta), sin(theta)); for (i = 0; i < N; ++i) { double r = fabs(real(cdata[i] * phase)); if (r > maxabs) maxabs = r; } for (i = N-1; i >= 0 && fabs(real(cdata[i] * phase)) < 0.5 * maxabs; --i) ; if (real(cdata[i] * phase) < 0) phase = -phase; for (i = 0; i < N; ++i) cdata[i] *= phase; complex *hdata = (complex *) H.data; for (i = 0; i < H.n; ++i) hdata[i*H.p + (band_num-1)] *= phase; } if (is_D(c0)) c0 = direction_component(Ex, component_direction(c0)); if (is_B(c0)) c0 = direction_component(Hx, component_direction(c0)); // use principle of equivalence to obtain equivalent currents FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c) && (c0 == Centered || c0 == c) && component_direction(c) != d && (gv.dim != D2 || !(parity & (EVEN_Z_PARITY | ODD_Z_PARITY)) || ((parity & EVEN_Z_PARITY) && !is_tm(c)) || ((parity & ODD_Z_PARITY) && is_tm(c)))) { // E current source = d x (eigenmode H) if ((d + 1) % 3 == component_direction(c) % 3) { meep_mpb_A_component = (d + 2) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, -amp); } else { meep_mpb_A_component = (d + 1) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, amp); } } maxwell_compute_d_from_H(mdata, H, (scalar_complex*)cdata, band_num - 1, 1); { // d_from_H actually computes -omega*D (see mpb/src/maxwell/maxwell_op.c) double scale = -1.0 / omega_src; int N = mdata->fft_output_size * 3; for (int i = 0; i < N; ++i) cdata[i] *= scale; } maxwell_compute_e_from_d(mdata, (scalar_complex*)cdata, 1); // use principle of equivalence to obtain equivalent currents FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c) && (c0 == Centered || c0 == c) && component_direction(c) != d && (gv.dim != D2 || !(parity & (EVEN_Z_PARITY | ODD_Z_PARITY)) || ((parity & EVEN_Z_PARITY) && !is_tm(c)) || ((parity & ODD_Z_PARITY) && is_tm(c)))) { // H current source = - d x (eigenmode E) if ((d + 1) % 3 == component_direction(c) % 3) { meep_mpb_A_component = (d + 2) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, amp); } else { meep_mpb_A_component = (d + 1) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, -amp); } } delete src_mpb; destroy_evectmatrix(H); delete[] eigvals; destroy_maxwell_data(mdata); #else /* !defined(HAVE_MPB) */ abort("Meep must be configured/compiled with MPB for add_eigenmode_source"); #endif } } // namespace meep meep-1.3/src/integrate.cpp0000644000175400001440000002053612506540456012516 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "meep_internals.hpp" /* generic integration and related routines, based fields::loop_in_chunk */ using namespace std; namespace meep { struct integrate_data { int num_fvals; const component *components; component *cS; complex *ph; complex *fvals; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; complex sum; double maxabs; field_function integrand; void *integrand_data_; }; static void integrate_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; // unused integrate_data *data = (integrate_data *) data_; int *off = data->offsets; component *cS = data->cS; complex *fvals = data->fvals, *ph = data->ph; complex sum = 0.0; double maxabs = 0; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int imos[6]; for (int i = 0; i < data->num_fvals; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fvals; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } complex integrand = data->integrand(fvals, loc, data->integrand_data_); maxabs = max(maxabs, abs(integrand)); sum += integrand * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); } data->maxabs = max(data->maxabs, maxabs); data->sum += sum; } complex fields::integrate(int num_fvals, const component *components, field_function integrand, void *integrand_data_, const volume &where, double *maxabs) { // check if components are all on the same grid: bool same_grid = true; for (int i = 1; i < num_fvals; ++i) if (gv.iyee_shift(components[i]) != gv.iyee_shift(components[0])) { same_grid = false; break; } component cgrid = Centered; if (same_grid && num_fvals > 0) cgrid = components[0]; integrate_data data; data.num_fvals = num_fvals; data.components = components; data.cS = new component[num_fvals]; data.ph = new complex[num_fvals]; data.fvals = new complex[num_fvals]; data.sum = 0; data.maxabs = 0; data.integrand = integrand; data.integrand_data_ = integrand_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fvals; ++i) if (components[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fvals; ++i) if (components[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * num_fvals]; for (int i = 0; i < 2 * num_fvals; ++i) data.offsets[i] = 0; loop_in_chunks(integrate_chunkloop, (void *) &data, where, cgrid); delete[] data.offsets; delete[] data.fvals; delete[] data.ph; delete[] data.cS; if (maxabs) *maxabs = max_to_all(data.maxabs); data.sum = sum_to_all(data.sum); return complex(real(data.sum), imag(data.sum)); } typedef struct { field_rfunction integrand; void *integrand_data; } rfun_wrap_data; static complex rfun_wrap(const complex *fvals, const vec &loc, void *data_) { rfun_wrap_data *data = (rfun_wrap_data *) data_; return data->integrand(fvals, loc, data->integrand_data); } double fields::integrate(int num_fvals, const component *components, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return real(integrate(num_fvals, components, rfun_wrap, &data, where, maxabs)); } double fields::max_abs(int num_fvals, const component *components, field_function integrand, void *integrand_data_, const volume &where) { double maxabs; integrate(num_fvals, components, integrand, integrand_data_, where, &maxabs); return maxabs; } double fields::max_abs(int num_fvals, const component *components, field_rfunction integrand, void *integrand_data_, const volume &where) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return max_abs(num_fvals, components, rfun_wrap, &data, where); } static complex return_the_field(const complex *fields, const vec &loc, void *integrand_data_) { (void) integrand_data_; (void) loc; // unused return fields[0]; } double fields::max_abs(int c, const volume &where) { if (is_derived(c)) return max_abs(derived_component(c), where); else return max_abs(component(c), where); } double fields::max_abs(component c, const volume &where) { if (is_derived(int(c))) return max_abs(derived_component(c), where); return max_abs(1, &c, return_the_field, 0, where); } double fields::max_abs(derived_component c, const volume &where) { if (!is_derived(int(c))) return max_abs(component(c), where); int nfields; component cs[12]; field_rfunction fun = derived_component_func(c, gv, nfields, cs); return max_abs(nfields, cs, fun, &nfields, where); } } // namespace meep meep-1.3/src/sources.cpp0000644000175400001440000002537112506540456012221 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { /*********************************************************************/ // this function is necessary to make equality commutative ... ugh bool src_times_equal(const src_time &t1, const src_time &t2) { return t1.is_equal(t2) && t2.is_equal(t1); } src_time *src_time::add_to(src_time *others, src_time **added) const { if (others) { if (src_times_equal(*this, *others)) *added = others; else others->next = add_to(others->next, added); return others; } else { src_time *t = clone(); t->next = others; *added = t; return t; } } double src_time::last_time_max(double after) { after = max(last_time(), after); if (next) return next->last_time_max(after); else return after; } gaussian_src_time::gaussian_src_time(double f, double fwidth, double s) { freq = f; width = 1.0 / fwidth; peak_time = width * s; cutoff = width * s * 2; // this is to make last_source_time as small as possible while (exp(-cutoff*cutoff / (2*width*width)) < 1e-100) cutoff *= 0.9; cutoff = float(cutoff); // don't make cutoff sensitive to roundoff error } gaussian_src_time::gaussian_src_time(double f, double w, double st, double et) { freq = f; width = w; peak_time = 0.5 * (st + et); cutoff = (et - st) * 0.5; // this is to make last_source_time as small as possible while (exp(-cutoff*cutoff / (2*width*width)) < 1e-100) cutoff *= 0.9; cutoff = float(cutoff); // don't make cutoff sensitive to roundoff error } complex gaussian_src_time::dipole(double time) const { double tt = time - peak_time; if (float(fabs(tt)) > cutoff) return 0.0; // correction factor so that current amplitude (= d(dipole)/dt) is // ~ 1 near the peak of the Gaussian. complex amp = 1.0 / complex(0,-2*pi*freq); return exp(-tt*tt / (2*width*width)) * polar(1.0, -2*pi*freq*tt) * amp; } bool gaussian_src_time::is_equal(const src_time &t) const { const gaussian_src_time *tp = dynamic_cast(&t); if (tp) return(tp->freq == freq && tp->width == width && tp->peak_time == peak_time && tp->cutoff == cutoff); else return 0; } complex continuous_src_time::dipole(double time) const { float rtime = float(time); if (rtime < start_time || rtime > end_time) return 0.0; // correction factor so that current amplitude (= d(dipole)/dt) is 1. complex amp = 1.0 / (complex(0,-1.0) * (2*pi)*freq); if (width == 0.0) return exp(complex(0,-1.0) * (2*pi)*freq*time) * amp; else { double ts = (time - start_time) / width - slowness; double te = (end_time - time) / width - slowness; return exp(complex(0,-1.0) * (2*pi)*freq*time) * amp * (1.0 + tanh(ts)) // goes from 0 to 2 * (1.0 + tanh(te)) // goes from 2 to 0 * 0.25; } } bool continuous_src_time::is_equal(const src_time &t) const { const continuous_src_time *tp = dynamic_cast(&t); if (tp) return(tp->freq == freq && tp->width == width && tp->start_time == start_time && tp->end_time == end_time && tp->slowness == slowness); else return 0; } bool custom_src_time::is_equal(const src_time &t) const { const custom_src_time *tp = dynamic_cast(&t); if (tp) return(tp->start_time == start_time && tp->end_time == end_time && tp->func == func && tp->data == data); else return 0; } /*********************************************************************/ src_vol::src_vol(component cc, src_time *st, int n, int *ind, complex *amps) { c = cc; if (is_D(c)) c = direction_component(Ex, component_direction(c)); if (is_B(c)) c = direction_component(Hx, component_direction(c)); t = st; next = NULL; npts = n; index = ind; A = amps; } src_vol::src_vol(const src_vol &sv) { c = sv.c; t = sv.t; npts = sv.npts; index = new int[npts]; A = new complex[npts]; for (int j=0; jnpts) abort("Cannot add grid_volume sources with different number of points\n"); /* Compare all of the indices...if this ever becomes too slow, we can just compare the first and last indices. */ for (int j=0; jindex[j] != index[j]) abort("Different indices\n"); others->A[j] += A[j]; } } else others->next = add_to(others->next); return others; } else { next = others; return this; } } /*********************************************************************/ // THIS VARIANT IS FOR BACKWARDS COMPATIBILITY, and is DEPRECATED: void fields::add_point_source(component c, double freq, double width, double peaktime, double cutoff, const vec &p, complex amp, int is_c) { width /= freq; if (is_c) { // TODO: don't ignore peaktime? continuous_src_time src(freq, width, time(), infinity, cutoff); if (is_magnetic(c)) src.is_integrated = false; add_point_source(c, src, p, amp); } else { cutoff = gv.inva + cutoff * width; if (peaktime <= 0.0) peaktime = time() + cutoff; // backward compatibility (slight phase shift in old Meep version) peaktime += is_magnetic(c) ? -dt*0.5 : dt; gaussian_src_time src(freq, width, peaktime - cutoff, peaktime + cutoff); if (is_magnetic(c)) src.is_integrated = false; add_point_source(c, src, p, amp); } } void fields::add_point_source(component c, const src_time &src, const vec &p, complex amp) { add_volume_source(c, src, volume(p, p), amp); } static complex one(const vec &pt) {(void) pt; return 1.0;} void fields::add_volume_source(component c, const src_time &src, const volume &where, complex amp) { add_volume_source(c, src, where, one, amp); } struct src_vol_chunkloop_data { complex (*A)(const vec &); complex amp; src_time *src; vec center; }; /* Adding source volumes can be treated as a kind of "integration" problem, since we need to loop over all the chunks that intersect the source grid_volume, with appropriate interpolation weights at the boundaries so that the integral of the current is fixed regardless of resolution. Unlike most uses of fields::loop_in_chunks, however, we set use_symmetry=false: we only find the intersection of the grid_volume with the untransformed chunks (since the transformed versions are implicit). */ static void src_vol_chunkloop(fields_chunk *fc, int ichunk, component c, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { src_vol_chunkloop_data *data = (src_vol_chunkloop_data *) data_; (void) S; (void) sn; // these should be the identity (void) dV0; (void) dV1; // grid_volume weighting is included in data->amp (void) ichunk; int npts = 1; LOOP_OVER_DIRECTIONS(is.dim, d) npts *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; int *index_array = new int[npts]; complex *amps_array = new complex[npts]; complex amp = data->amp * conj(shift_phase); direction cd = component_direction(c); double inva = fc->gv.inva; int idx_vol = 0; LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc += shift * (0.5*inva) - data->center; amps_array[idx_vol] = IVEC_LOOP_WEIGHT(s0,s1,e0,e1,1) * amp * data->A(loc); /* for "D" sources, multiply by epsilon. FIXME: this is not quite right because it doesn't handle non-diagonal chi1inv! similarly, for "B" sources, multiply by mu. */ if (is_D(c) && fc->s->chi1inv[c-Dx+Ex][cd]) amps_array[idx_vol] /= fc->s->chi1inv[c-Dx+Ex][cd][idx]; if (is_B(c) && fc->s->chi1inv[c-Bx+Hx][cd]) amps_array[idx_vol] /= fc->s->chi1inv[c-Bx+Hx][cd][idx]; index_array[idx_vol++] = idx; } if (idx_vol != npts) abort("add_volume_source: computed wrong npts (%d vs. %d)", npts, idx_vol); src_vol *tmp = new src_vol(c, data->src, npts, index_array, amps_array); field_type ft = is_magnetic(c) ? B_stuff : D_stuff; fc->sources[ft] = tmp->add_to(fc->sources[ft]); } void fields::add_volume_source(component c, const src_time &src, const volume &where_, complex A(const vec &), complex amp) { volume where(where_); // make a copy to adjust size if necessary if (gv.dim != where.dim) abort("incorrect source grid_volume dimensionality in add_volume_source"); LOOP_OVER_DIRECTIONS(gv.dim, d) { double w = user_volume.boundary_location(High, d) - user_volume.boundary_location(Low, d); if (where.in_direction(d) > w + gv.inva) abort("Source width > cell width in %s direction!\n", direction_name(d)); else if (where.in_direction(d) > w) { // difference is less than 1 pixel double dw = where.in_direction(d) - w; where.set_direction_min(d, where.in_direction_min(d) - dw * 0.5); where.set_direction_max(d, where.in_direction_min(d) + w); } } src_vol_chunkloop_data data; data.A = A ? A : one; data.amp = amp; LOOP_OVER_DIRECTIONS(gv.dim, d) if (where.in_direction(d) == 0.0 && !nosize_direction(d)) // delta-fun data.amp *= gv.a; // correct units for J delta-function amplitude sources = src.add_to(sources, &data.src); data.center = (where.get_min_corner() + where.get_max_corner()) * 0.5; loop_in_chunks(src_vol_chunkloop, (void *) &data, where, c, false); require_component(c); } } // namespace meep meep-1.3/src/sphere-quad.cpp0000644000175400001440000002012712506540456012746 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This file is compiled into a program sphere_quad that is used to generate the file sphere-quad.h, which is a table of quadrature points and weights for integrating on spheres in 1d/2d/3d. */ #include #include #include #define SHIFT3(x,y,z) {double SHIFT3_dummy = z; z = y; y = x; x = SHIFT3_dummy;} #define CHECK(condition, message) do { \ if (!(condition)) { \ fprintf(stderr, "CHECK failure on line %d of " __FILE__ ": " \ message "\n", __LINE__); exit(EXIT_FAILURE); \ } \ } while (0) /* Compute quadrature points and weights for integrating on the unit sphere. x, y, z, and weight should be arrays of num_sq_pts values to hold the coordinates and weights of the quadrature points on output. Currently, num_sq_pts = 12, 50, and 72 are supported. */ void spherical_quadrature_points(double *x, double *y, double *z, double *weight, int num_sq_pts) { int i,j,k,l, n = 0; double x0, y0, z0, w; if (num_sq_pts == 50) { /* Computes quadrature points and weights for 50-point 11th degree integration formula on a unit sphere. This particular quadrature formula has the advantage, for our purposes, of preserving the symmetry group of an octahedron (i.e. simple cubic symmetry, with respect to the Cartesian xyz axes). References: A. D. McLaren, "Optimal Numerical Integration on a Sphere," Math. Comp. 17, pp. 361-383 (1963). Also in: Arthur H. Stroud, "Approximate Calculation of Multiple Integrals" (Prentice Hall, 1971) (formula number U3:11-1). This code was written with the help of example code by John Burkardt: http://www.psc.edu/~burkardt/src_pt/stroud/stroud.html */ x0 = 1; y0 = z0 = 0; w = 9216 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 3; ++j) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } x0 = y0 = sqrt(0.5); z0 = 0; w = 16384 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 3; ++k) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } x0 = y0 = z0 = sqrt(1.0 / 3.0); w = 15309 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 2; ++k) { z0 = -z0; x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } x0 = y0 = sqrt(1.0 / 11.0); z0 = 3 * x0; w = 14641 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 2; ++k) { z0 = -z0; for (l = 0; l < 3; ++l) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } } } else if (num_sq_pts == 72 || num_sq_pts == 12) { /* As above (same references), but with a 72-point 14th degree formula, this time with the symmetry group of an icosohedron. (Stroud formula number U3:14-1.) Alternatively, just use the 12-point 5th degree formula consisting of the vertices of a regular icosohedron. */ /* first, the vertices of an icosohedron: */ x0 = sqrt(0.5 - sqrt(0.05)); y0 = sqrt(0.5 + sqrt(0.05)); z0 = 0; if (num_sq_pts == 72) w = 125 / 10080.0; else w = 1 / 12.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 3; ++k) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } if (num_sq_pts == 72) { /* it would be nice, for completeness, to have more digits here: */ double coords[3][5] = { { -0.151108275, 0.315838353, 0.346307112, -0.101808787, -0.409228403 }, { 0.155240600, 0.257049387, 0.666277790, 0.817386065, 0.501547712 }, { 0.976251323, 0.913330032, 0.660412970, 0.567022920, 0.762221757 } }; w = 143 / 10080.0; for (l = 0; l < 5; ++l) { x0 = coords[0][l]; y0 = coords[1][l]; z0 = coords[2][l]; for (i = 0; i < 3; ++i) { double dummy = x0; x0 = z0; z0 = -y0; y0 = -dummy; for (j = 0; j < 3; ++j) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } y0 = -y0; z0 = -z0; x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } } else CHECK(0, "spherical_quadrature_points: passed unknown # points!"); CHECK(n == num_sq_pts, "bug in spherical_quadrature_points: wrong number of points!"); } #define NQUAD3 50 /* use 50-point quadrature formula by default */ /**********************************************************************/ #define K_PI 3.141592653589793238462643383279502884197 #define NQUAD2 12 /**********************************************************************/ double sqr(double x) { return x * x; } double dist2(double x1, double y1, double z1, double x2, double y2, double z2) { return sqr(x1-x2) + sqr(y1-y2) + sqr(z1-z2); } double min2(double a, double b) { return a < b ? a : b; } /* sort the array to maximize the spacing of each point with the previous points */ void sort_by_distance(int n, double x[], double y[], double z[], double w[]) { for (int i = 1; i < n; ++i) { double d2max = 0; double d2maxsum = 0; int jmax = i; for (int j = i; j < n; ++j) { double d2min = 1e20, d2sum = 0; for (int k = 0; k < i; ++k) { double d2 = float(dist2(x[k],y[k],z[k], x[j],y[j],z[j])); d2min = min2(d2min, d2); d2sum += d2; } if (d2min > d2max || (d2min == d2max && d2sum > d2maxsum)) { d2max = d2min; d2maxsum = d2sum; jmax = j; } } double xi = x[i], yi = y[i], zi = z[i], wi = w[i]; x[i] = x[jmax]; y[i] = y[jmax]; z[i] = z[jmax]; w[i] = w[jmax]; x[jmax] = xi; y[jmax] = yi; z[jmax] = zi; w[jmax] = wi; } } int main(void) { int i; double x2[NQUAD2], y2[NQUAD2], z2[NQUAD2], w2[NQUAD2]; double x3[NQUAD3], y3[NQUAD3], z3[NQUAD3], w3[NQUAD3]; printf( "/* For 1d, 2d, and 3d, quadrature points and weights on a unit sphere.\n" " There are num_sphere_quad[dim-1] points i, with the i-th point at\n" " (x,y,z) = (sphere_quad[dim-1][i][ 0, 1, 2 ]), and with a quadrature\n" " weight sphere_quad[dim-1][i][3]. */\n\n"); printf("static const int num_sphere_quad[3] = { %d, %d, %d };\n\n", 2, NQUAD2, NQUAD3); printf("static const double sphere_quad[3][%d][4] = {\n", NQUAD3); printf(" { {0,0,1,0.5}, {0,0,-1,0.5} },\n"); for (i = 0; i < NQUAD2; ++i) { x2[i] = cos(2*i * K_PI / NQUAD2); y2[i] = sin(2*i * K_PI / NQUAD2); z2[i] = 0.0; w2[i] = 1.0 / NQUAD2; } sort_by_distance(NQUAD2,x2,y2,z2,w2); printf(" {\n"); for (i = 0; i < NQUAD2; ++i) { printf(" { %0.20g, %0.20g, %0.20g, %0.20g },\n", x2[i], y2[i], z2[i], w2[i]); } printf(" },\n"); printf(" {\n"); spherical_quadrature_points(x3,y3,z3, w3, NQUAD3); sort_by_distance(NQUAD3,x3,y3,z3,w3); for (i = 0; i < NQUAD3; ++i) { printf(" { %0.20g, %0.20g, %0.20g, %0.20g },\n", x3[i], y3[i], z3[i], w3[i]); } printf(" }\n"); printf("};\n"); return 0; } meep-1.3/src/stress.cpp0000644000175400001440000001355012506540456012055 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Computation of the force spectrum via integration of the Maxwell stress tensor of the Fourier-transformed fields */ #include using namespace std; namespace meep { dft_force::dft_force(dft_chunk *offdiag1_, dft_chunk *offdiag2_, dft_chunk *diag_, double fmin, double fmax, int Nf) { if (Nf <= 1) fmin = fmax = (fmin + fmax) * 0.5; freq_min = fmin; Nfreq = Nf; dfreq = Nf <= 1 ? 0.0 : (fmax - fmin) / (Nf - 1); offdiag1 = offdiag1_; offdiag2 = offdiag2_; diag = diag_; } dft_force::dft_force(const dft_force &f) { freq_min = f.freq_min; Nfreq = f.Nfreq; dfreq = f.dfreq; offdiag1 = f.offdiag1; offdiag2 = f.offdiag2; diag = f.diag; } void dft_force::remove() { while (offdiag1) { dft_chunk *nxt = offdiag1->next_in_dft; delete offdiag1; offdiag1 = nxt; } while (offdiag2) { dft_chunk *nxt = offdiag2->next_in_dft; delete offdiag2; offdiag2 = nxt; } while (diag) { dft_chunk *nxt = diag->next_in_dft; delete diag; diag = nxt; } } void dft_force::operator-=(const dft_force &st) { if (offdiag1 && st.offdiag1) *offdiag1 -= *st.offdiag1; if (offdiag2 && st.offdiag2) *offdiag2 -= *st.offdiag2; if (diag && st.diag) *diag -= *st.diag; } static void stress_sum(int Nfreq, double *F, const dft_chunk *F1, const dft_chunk *F2) { for (const dft_chunk *curF1 = F1, *curF2 = F2; curF1 && curF2; curF1 = curF1->next_in_dft, curF2 = curF2->next_in_dft) { complex extra_weight(real(curF1->extra_weight), imag(curF1->extra_weight)); for (int k = 0; k < curF1->N; ++k) for (int i = 0; i < Nfreq; ++i) F[i] += real(extra_weight * curF1->dft[k*Nfreq + i] * conj(curF2->dft[k*Nfreq + i])); } } double *dft_force::force() { double *F = new double[Nfreq]; for (int i = 0; i < Nfreq; ++i) F[i] = 0; stress_sum(Nfreq, F, offdiag1, offdiag2); stress_sum(Nfreq, F, diag, diag); double *Fsum = new double[Nfreq]; sum_to_all(F, Fsum, Nfreq); delete[] F; return Fsum; } void dft_force::save_hdf5(h5file *file, const char *dprefix) { save_dft_hdf5(offdiag1, "offdiag1", file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(offdiag2, "offdiag2", file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(diag, "diag", file, dprefix); } void dft_force::load_hdf5(h5file *file, const char *dprefix) { load_dft_hdf5(offdiag1, "offdiag1", file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(offdiag2, "offdiag2", file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(diag, "diag", file, dprefix); } void dft_force::save_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::WRITE, prefix); save_hdf5(ff, dprefix); delete ff; } void dft_force::load_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::READONLY, prefix); load_hdf5(ff, dprefix); delete ff; } void dft_force::scale_dfts(complex scale) { if (offdiag1) offdiag1->scale_dft(scale); if (offdiag2) offdiag2->scale_dft(scale); if (diag) diag->scale_dft(scale); } /* note that the components where->c indicate the direction of the force to be computed, so they should be vector components (such as Ex, Ey, ... or Sx, ...) rather than pseudovectors (like Hx, ...). */ dft_force fields::add_dft_force(const volume_list *where_, double freq_min, double freq_max, int Nfreq){ dft_chunk *offdiag1 = 0, *offdiag2 = 0, *diag = 0; volume_list *where = S.reduce(where_); volume_list *where_save = where; for (; where; where = where->next) { direction nd = normal_direction(where->v); if (nd == NO_DIRECTION) abort("cannot determine dft_force normal"); direction fd = component_direction(where->c); // force direction if (fd == NO_DIRECTION) abort("NO_DIRECTION dft_force is invalid"); if (coordinate_mismatch(gv.dim, fd)) abort("coordinate-type mismatch in add_dft_force"); if (fd != nd) { // off-diagaonal stress-tensor terms offdiag1 = add_dft(direction_component(Ex, fd), where->v, freq_min, freq_max, Nfreq, true, where->weight, offdiag1); offdiag2 = add_dft(direction_component(Ex, nd), where->v, freq_min, freq_max, Nfreq, false, 1.0, offdiag2); offdiag1 = add_dft(direction_component(Hx, fd), where->v, freq_min, freq_max, Nfreq, true, where->weight, offdiag1); offdiag2 = add_dft(direction_component(Hx, nd), where->v, freq_min, freq_max, Nfreq, false, 1.0, offdiag2); } else // diagonal stress-tensor terms LOOP_OVER_FIELD_DIRECTIONS(gv.dim, d) { complex weight1 = where->weight * (d == fd ? +0.5 : -0.5); diag = add_dft(direction_component(Ex, d), where->v, freq_min, freq_max, Nfreq, true, 1.0, diag, true, weight1, false); diag = add_dft(direction_component(Hx, d), where->v, freq_min, freq_max, Nfreq, true, 1.0, diag, true, weight1, false); } } delete where_save; return dft_force(offdiag1, offdiag2, diag, freq_min, freq_max, Nfreq); } } // namespace meep meep-1.3/src/meep_internals.hpp0000644000175400001440000001601612506540456013544 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "meep.hpp" namespace meep { #define DOCMP for (int cmp=0;cmp<2-is_real;cmp++) #define DOCMP2 for (int cmp=0;cmp<2;cmp++) inline double max(double a, double b) { return (a > b) ? a : b; } inline double min(double a, double b) { return (a < b) ? a : b; } inline int max(int a, int b) { return (a > b) ? a : b; } inline int min(int a, int b) { return (a < b) ? a : b; } static inline int abs(int a) { return a < 0 ? -a : a; } static inline double abs(double a) { return fabs(a); } // note that C99 has a round() function, but I don't want to rely on it static inline int my_round(double x) { return int(floor(fabs(x) + 0.5) * (x < 0 ? -1 : 1)); } inline int small_r_metal(int m) { return m-1; } inline int rmin_bulk(int m) { int r = 1 + small_r_metal(m); if (r < 1) r = 1; return r; } class src_vol { public: src_vol(component cc, src_time *st, int n, int *ind, std::complex *amps); src_vol(const src_vol &sv); ~src_vol() { delete next; delete[] index; delete[] A;} src_time *t; int *index; // list of locations of sources in grid (indices) int npts; // number of points in list component c; // field component the source applies to std::complex *A; // list of amplitudes std::complex dipole(int j) { return A[j] * t->dipole(); } std::complex current(int j) { return A[j] * t->current(); } void update(double time, double dt) { t->update(time, dt); } bool operator==(const src_vol &sv) const { return sv.index[0]==index[0] && sv.index[sv.npts-1]==index[npts-1] && sv.c==c && sv.t==t; } src_vol *add_to(src_vol *others); src_vol *next; }; const int num_bandpts = 32; class bandsdata { public: bandsdata(); ~bandsdata(); std::complex *f[num_bandpts][NUM_FIELD_COMPONENTS]; // The following is the polarization at just one point, with Pz and Pp // added together (a crude compromize for speed, while still observing the // phonon bands). std::complex *P; int tstart, tend, index[num_bandpts], maxbands, scale_factor; fields_chunk *chunk[num_bandpts]; double dt, fmin, fmax, qmin, fpmin; int ntime; int verbosity; int get_freqs(std::complex *data, int n, std::complex *amps, double *freqs, double *decays); int look_for_more_bands(std::complex *simple_data, double *reff, double *refd, std::complex *refa, std::complex *refdata, int numref); }; symmetry r_to_minus_r_symmetry(int m); #define MIN_OUTPUT_TIME 4.0 // output no more often than this many seconds // functions in step_generic.cpp: void step_curl(realnum *f, component c, const realnum *g1, const realnum *g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const double *sig, const double *kap, const double *siginv, realnum *fu, direction dsigu, const double *sigu, const double *kapu, const double *siginvu, double dt, const realnum *cnd, const realnum *cndinv, realnum *fcnd); void step_update_EDHB(realnum *f, component fc, const grid_volume &gv, const realnum *g, const realnum *g1, const realnum *g2, const realnum *u, const realnum *u1, const realnum *u2, int s, int s1, int s2, const realnum *chi2, const realnum *chi3, realnum *fw, direction dsigw, const double *sigw, const double *kapw); void step_beta(realnum *f, component c, const realnum *g, const grid_volume &gv, double betadt, direction dsig, const double *siginv, realnum *fu, direction dsigu, const double *siginvu, const realnum *cndinv, realnum *fcnd); // functions in step_generic_stride1.cpp, generated from step_generic.cpp: void step_curl_stride1(realnum *f, component c, const realnum *g1, const realnum *g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const double *sig, const double *kap, const double *siginv, realnum *fu, direction dsigu, const double *sigu, const double *kapu, const double *siginvu, double dt, const realnum *cnd, const realnum *cndinv, realnum *fcnd); void step_update_EDHB_stride1(realnum *f, component fc, const grid_volume &gv, const realnum *g, const realnum *g1, const realnum *g2, const realnum *u, const realnum *u1, const realnum *u2, int s, int s1, int s2, const realnum *chi2, const realnum *chi3, realnum *fw, direction dsigw, const double *sigw, const double *kapw); void step_beta_stride1(realnum *f, component c, const realnum *g, const grid_volume &gv, double betadt, direction dsig, const double *siginv, realnum *fu, direction dsigu, const double *siginvu, const realnum *cndinv, realnum *fcnd); /* macro wrappers around time-stepping functions: for performance reasons, if the inner loop is stride-1 then we use the stride-1 versions, which allow gcc (and possibly other compilers) to do additional optimizations, especially loop vectorization */ #define STEP_CURL(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, kap, siginv, fu, dsigu, sigu, kapu, siginvu, dt, cnd, cndinv, fcnd) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_curl_stride1(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, kap, siginv, fu, dsigu, sigu, kapu, siginvu, dt, cnd, cndinv, fcnd); \ else \ step_curl(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, kap, siginv, fu, dsigu, sigu, kapu, siginvu, dt, cnd, cndinv, fcnd); \ } while (0) #define STEP_UPDATE_EDHB(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw, kapw) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_update_EDHB_stride1(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw, kapw); \ else \ step_update_EDHB(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw, kapw); \ } while (0) #define STEP_BETA(f, c, g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_beta_stride1(f, c,g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd); \ else \ step_beta(f, c,g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd); \ } while (0) } // namespace meep meep-1.3/src/step_generic.cpp0000644000175400001440000004422412322767402013201 00000000000000#include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define DPR double * restrict #define RPR realnum * restrict /* These macros get into the guts of the LOOP_OVER_VOL loops to efficiently construct the index k into a PML sigma array. Basically, k needs to increment by 2 for each increment of one of LOOP's for-loops, starting at the appropriate corner of the grid_volume, and these macros define the relevant strides etc. for each loop. KSTRIDE_DEF defines the relevant strides etc. and goes outside the LOOP, wheras KDEF defines the k index and goes inside the LOOP. */ #define KSTRIDE_DEF(dsig, k, corner) \ const int k##0 = corner.in_direction(dsig) \ - gv.little_corner().in_direction(dsig); \ const int s##k##1 = gv.yucky_direction(0) == dsig ? 2 : 0; \ const int s##k##2 = gv.yucky_direction(1) == dsig ? 2 : 0; \ const int s##k##3 = gv.yucky_direction(2) == dsig ? 2 : 0 #define KDEF(k,dsig) const int k = ((k##0 + s##k##1*loop_i1) + s##k##2*loop_i2) + s##k##3*loop_i3 #define DEF_k KDEF(k,dsig) #define DEF_ku KDEF(ku,dsigu) #define DEF_kw KDEF(kw,dsigw) using namespace std; namespace meep { #define SWAP(t,a,b) { t xxxx = a; a = b; b = xxxx; } /* update step for df/dt = curl g, i.e. f += dt curl g = dt/dx (dg1 - dg2) where dgk = gk[i] - gk[i+sk]. g = (g1,g2), where g1 or g2 may be NULL. Note that dt/dx and/or s1 and s2 may be negative to flip signs of derivatives. PML: sig[k] = sigma[k]*dt/2, siginv[k] = 1 / (kap[k] + sigma[k]*dt/2). Here, k is the index in the dsig direction. if dsig == NO_DIRECTION, then PML is not used. (dsig is the sigma direction.) if non-NULL, then cnd is an array of conductivity values, changing the underlying PDE to: df/dt = curl g - cnd f which is updated as: f = [ dt * curl g + (1 - dt cnd/2) f ] / (1 + dt cnd/2) cndinv should be an array of 1 / (1 + dt cnd/2). In the case of PML, cndinv should contain 1 / (1 + dt (cnd + sigma)/2). fcnd is an auxiliary field used ONLY when we simultaneously have PML (dsig != NO_DIR) and conductivity, in which case fcnd solves dfcnd/dt = curl g - cnd*fcnd and f satisfies df/dt = dfcnd/dt - sigma*f. fu is another auxiliary field used only in PML (dsigu != NO_DIR), in which case f solves: df/dt = dfu/dt - sigma_u * f and fu replaces f in the equations above (fu += dt curl g etcetera). */ void step_curl(RPR f, component c, const RPR g1, const RPR g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const DPR sig, const DPR kap, const DPR siginv, RPR fu, direction dsigu, const DPR sigu, const DPR kapu, const DPR siginvu, double dt, const RPR cnd, const RPR cndinv, RPR fcnd) { if (!g1) { // swap g1 and g2 SWAP(const RPR, g1, g2); SWAP(int, s1, s2); dtdx = -dtdx; // need to flip derivative sign } /* The following are a bunch of special cases of the "MOST GENERAL CASE" loop below. We make copies of the loop for each special case in order to keep the innermost loop efficient. This is especially important because the non-PML cases are actually more common. (The "right" way to do this is by partial evaluation of the most general case, but that would require a code generator.) */ if (dsig == NO_DIRECTION) { // no PML in f update if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; } else { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; } } else { // no conductivity if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); } else { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i]); } } } else { // fu update, no PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i]); f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } else { /* PML in f update */ KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; f[i] = ((kap[k] - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = ((kap[k] - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } } else { // no conductivity (other than PML conductivity) if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((kap[k] - sig[k]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((kap[k] - sig[k]) * f[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; } } } } else { // fu update + PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } ///////////////////////////////////////////////////////////// } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity (other than PML conductivity) if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } } /* field-update equation f += betadt * g (plus variants for conductivity and/or PML). This is used in 2d calculations to add an exp(i beta z) time dependence, which gives an additional i \beta \hat{z} \times cross-product in the curl equations. */ void step_beta(RPR f, component c, const RPR g, const grid_volume &gv, double betadt, direction dsig, const DPR siginv, RPR fu, direction dsigu, const DPR siginvu, const RPR cndinv, RPR fcnd) { if (!g) return; if (dsig != NO_DIRECTION) { // PML in f update KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu != NO_DIRECTION) { // PML in f + fu KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity + PML //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; fu[i] += (df = dfcnd * siginv[k]); f[i] += siginvu[ku] * df; } ///////////////////////////////////////////////////////////// } else { // PML only LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; fu[i] += (df = betadt * g[i] * siginv[k]); f[i] += siginvu[ku] * df; } } } else { // PML in f, no fu if (cndinv) { // conductivity + PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; f[i] += dfcnd * siginv[k]; } } else { // PML only LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] += betadt * g[i] * siginv[k]; } } } } else { // no PML in f update if (dsigu != NO_DIRECTION) { // fu, no PML in f KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity, no PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i] * cndinv[i]); f[i] += siginvu[ku] * df; } } else { // no conductivity or PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i]); f[i] += siginvu[ku] * df; } } } else { // no PML, no fu if (cndinv) { // conductivity, no PML LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i] * cndinv[i]; } else { // no conductivity or PML LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i]; } } } } /* Given Dsqr = |D|^2 and Di = component of D, compute the factor f so that Ei = chi1inv * f * Di. In principle, this would involve solving a cubic equation, but instead we use a Pade approximant that is accurate to several orders. This is inaccurate if the nonlinear index change is large, of course, but in that case the chi2/chi3 power-series expansion isn't accurate anyway, so the cubic isn't physical there either. */ inline double calc_nonlinear_u(const double Dsqr, const double Di, const double chi1inv, const double chi2, const double chi3) { double c2 = Di*chi2*(chi1inv*chi1inv); double c3 = Dsqr*chi3*(chi1inv*chi1inv*chi1inv); return (1 + c2 + 2*c3)/(1 + 2*c2 + 3*c3); } /* Update E from D using epsilon and PML, *or* update H from B using mu and PML. To be generic, here we set f = u * g, where u may be a tensor, and we also have a nonlinear susceptibility chi. Here, g = (g,g1,g2) where g1 and g2 are the off-diagonal components, if any (g2 may be NULL). In PML (dsigw != NO_DIR), we have an additional auxiliary field fw, which is updated by the equations: fw = u * g df/dt = kappaw dfw/dt - sigmaw * fw That is, fw is updated like the non-PML f, and f is updated from fw by a little ODE. Here, sigw[k] = sigmaw[k]*dt/2, kappaw[k] = kapw[k] */ void step_update_EDHB(RPR f, component fc, const grid_volume &gv, const RPR g, const RPR g1, const RPR g2, const RPR u, const RPR u1, const RPR u2, int s, int s1, int s2, const RPR chi2, const RPR chi3, RPR fw, direction dsigw, const DPR sigw, const DPR kapw) { if (!f) return; if ((!g1 && g2) || (g1 && g2 && !u1 && u2)) { /* swap g1 and g2 */ SWAP(const RPR, g1, g2); SWAP(const RPR, u1, u2); SWAP(int, s1, s2); } // stable averaging of offdiagonal components #define OFFDIAG(u,g,sx) (0.25 * ((g[i]+g[i-sx])*u[i] \ + (g[i+s]+g[(i+s)-sx])*u[i+s])) /* As with step_curl, these loops are all essentially copies of the "MOST GENERAL CASE" loop with various terms thrown out. */ if (dsigw != NO_DIRECTION) { //////// PML case (with fw) ///////////// KSTRIDE_DEF(dsigw, kw, gv.little_owned_corner0(fc)); if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } ///////////////////////////////////////////////////////////// } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else if (g1) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = g[i]; f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } } else { /////////////// no PML (no fw) /////////////////// if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)); } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); } } else if (g1) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); } } } else if (u) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us); } } else LOOP_OVER_VOL_OWNED(gv, fc, i) f[i] = g[i]; } } } } // namespace meep meep-1.3/src/step_generic_stride1.cpp0000644000175400001440000004450712322767624014646 00000000000000/* This file was automatically generated --- DO NOT EDIT */ #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define DPR double * restrict #define RPR realnum * restrict /* These macros get into the guts of the S1LOOP_OVER_VOL loops to efficiently construct the index k into a PML sigma array. Basically, k needs to increment by 2 for each increment of one of LOOP's for-loops, starting at the appropriate corner of the grid_volume, and these macros define the relevant strides etc. for each loop. KSTRIDE_DEF defines the relevant strides etc. and goes outside the LOOP, wheras KDEF defines the k index and goes inside the LOOP. */ #define KSTRIDE_DEF(dsig, k, corner) \ const int k##0 = corner.in_direction(dsig) \ - gv.little_corner().in_direction(dsig); \ const int s##k##1 = gv.yucky_direction(0) == dsig ? 2 : 0; \ const int s##k##2 = gv.yucky_direction(1) == dsig ? 2 : 0; \ const int s##k##3 = gv.yucky_direction(2) == dsig ? 2 : 0 #define KDEF(k,dsig) const int k = ((k##0 + s##k##1*loop_i1) + s##k##2*loop_i2) + s##k##3*loop_i3 #define DEF_k KDEF(k,dsig) #define DEF_ku KDEF(ku,dsigu) #define DEF_kw KDEF(kw,dsigw) using namespace std; namespace meep { #define SWAP(t,a,b) { t xxxx = a; a = b; b = xxxx; } /* update step for df/dt = curl g, i.e. f += dt curl g = dt/dx (dg1 - dg2) where dgk = gk[i] - gk[i+sk]. g = (g1,g2), where g1 or g2 may be NULL. Note that dt/dx and/or s1 and s2 may be negative to flip signs of derivatives. PML: sig[k] = sigma[k]*dt/2, siginv[k] = 1 / (kap[k] + sigma[k]*dt/2). Here, k is the index in the dsig direction. if dsig == NO_DIRECTION, then PML is not used. (dsig is the sigma direction.) if non-NULL, then cnd is an array of conductivity values, changing the underlying PDE to: df/dt = curl g - cnd f which is updated as: f = [ dt * curl g + (1 - dt cnd/2) f ] / (1 + dt cnd/2) cndinv should be an array of 1 / (1 + dt cnd/2). In the case of PML, cndinv should contain 1 / (1 + dt (cnd + sigma)/2). fcnd is an auxiliary field used ONLY when we simultaneously have PML (dsig != NO_DIR) and conductivity, in which case fcnd solves dfcnd/dt = curl g - cnd*fcnd and f satisfies df/dt = dfcnd/dt - sigma*f. fu is another auxiliary field used only in PML (dsigu != NO_DIR), in which case f solves: df/dt = dfu/dt - sigma_u * f and fu replaces f in the equations above (fu += dt curl g etcetera). */ void step_curl_stride1(RPR f, component c, const RPR g1, const RPR g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const DPR sig, const DPR kap, const DPR siginv, RPR fu, direction dsigu, const DPR sigu, const DPR kapu, const DPR siginvu, double dt, const RPR cnd, const RPR cndinv, RPR fcnd) { if (!g1) { // swap g1 and g2 SWAP(const RPR, g1, g2); SWAP(int, s1, s2); dtdx = -dtdx; // need to flip derivative sign } /* The following are a bunch of special cases of the "MOST GENERAL CASE" loop below. We make copies of the loop for each special case in order to keep the innermost loop efficient. This is especially important because the non-PML cases are actually more common. (The "right" way to do this is by partial evaluation of the most general case, but that would require a code generator.) */ if (dsig == NO_DIRECTION) { // no PML in f update if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; } } else { // no conductivity if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i]); } } } else { // fu update, no PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i]); f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } else { /* PML in f update */ KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; f[i] = ((kap[k] - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = ((kap[k] - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } } else { // no conductivity (other than PML conductivity) if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((kap[k] - sig[k]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((kap[k] - sig[k]) * f[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; } } } } else { // fu update + PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } ///////////////////////////////////////////////////////////// } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity (other than PML conductivity) if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((kap[k] - sig[k]) * fu[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; f[i] = siginvu[ku] * ((kapu[ku] - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } } /* field-update equation f += betadt * g (plus variants for conductivity and/or PML). This is used in 2d calculations to add an exp(i beta z) time dependence, which gives an additional i \beta \hat{z} \times cross-product in the curl equations. */ void step_beta_stride1(RPR f, component c, const RPR g, const grid_volume &gv, double betadt, direction dsig, const DPR siginv, RPR fu, direction dsigu, const DPR siginvu, const RPR cndinv, RPR fcnd) { if (!g) return; if (dsig != NO_DIRECTION) { // PML in f update KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu != NO_DIRECTION) { // PML in f + fu KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity + PML //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; fu[i] += (df = dfcnd * siginv[k]); f[i] += siginvu[ku] * df; } ///////////////////////////////////////////////////////////// } else { // PML only S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; fu[i] += (df = betadt * g[i] * siginv[k]); f[i] += siginvu[ku] * df; } } } else { // PML in f, no fu if (cndinv) { // conductivity + PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; f[i] += dfcnd * siginv[k]; } } else { // PML only S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] += betadt * g[i] * siginv[k]; } } } } else { // no PML in f update if (dsigu != NO_DIRECTION) { // fu, no PML in f KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity, no PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i] * cndinv[i]); f[i] += siginvu[ku] * df; } } else { // no conductivity or PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i]); f[i] += siginvu[ku] * df; } } } else { // no PML, no fu if (cndinv) { // conductivity, no PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i] * cndinv[i]; } else { // no conductivity or PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i]; } } } } /* Given Dsqr = |D|^2 and Di = component of D, compute the factor f so that Ei = chi1inv * f * Di. In principle, this would involve solving a cubic equation, but instead we use a Pade approximant that is accurate to several orders. This is inaccurate if the nonlinear index change is large, of course, but in that case the chi2/chi3 power-series expansion isn't accurate anyway, so the cubic isn't physical there either. */ inline double calc_nonlinear_u(const double Dsqr, const double Di, const double chi1inv, const double chi2, const double chi3) { double c2 = Di*chi2*(chi1inv*chi1inv); double c3 = Dsqr*chi3*(chi1inv*chi1inv*chi1inv); return (1 + c2 + 2*c3)/(1 + 2*c2 + 3*c3); } /* Update E from D using epsilon and PML, *or* update H from B using mu and PML. To be generic, here we set f = u * g, where u may be a tensor, and we also have a nonlinear susceptibility chi. Here, g = (g,g1,g2) where g1 and g2 are the off-diagonal components, if any (g2 may be NULL). In PML (dsigw != NO_DIR), we have an additional auxiliary field fw, which is updated by the equations: fw = u * g df/dt = kappaw dfw/dt - sigmaw * fw That is, fw is updated like the non-PML f, and f is updated from fw by a little ODE. Here, sigw[k] = sigmaw[k]*dt/2, kappaw[k] = kapw[k] */ void step_update_EDHB_stride1(RPR f, component fc, const grid_volume &gv, const RPR g, const RPR g1, const RPR g2, const RPR u, const RPR u1, const RPR u2, int s, int s1, int s2, const RPR chi2, const RPR chi3, RPR fw, direction dsigw, const DPR sigw, const DPR kapw) { if (!f) return; if ((!g1 && g2) || (g1 && g2 && !u1 && u2)) { /* swap g1 and g2 */ SWAP(const RPR, g1, g2); SWAP(const RPR, u1, u2); SWAP(int, s1, s2); } // stable averaging of offdiagonal components #define OFFDIAG(u,g,sx) (0.25 * ((g[i]+g[i-sx])*u[i] \ + (g[i+s]+g[(i+s)-sx])*u[i+s])) /* As with step_curl_stride1, these loops are all essentially copies of the "MOST GENERAL CASE" loop with various terms thrown out. */ if (dsigw != NO_DIRECTION) { //////// PML case (with fw) ///////////// KSTRIDE_DEF(dsigw, kw, gv.little_owned_corner0(fc)); if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } ///////////////////////////////////////////////////////////// } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else if (g1) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } else if (u) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = (gs * us); f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { DEF_kw; double fwprev = fw[i], kapwkw = kapw[kw], sigwkw = sigw[kw]; fw[i] = g[i]; f[i] += (kapwkw + sigwkw) * fw[i] - (kapwkw - sigwkw) * fwprev; } } } } else { /////////////// no PML (no fw) /////////////////// if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)); } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); } } else if (g1) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); } } } else if (u) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us); } } else S1LOOP_OVER_VOL_OWNED(gv, fc, i) f[i] = g[i]; } } } } // namespace meep meep-1.3/src/structure.cpp0000644000175400001440000007526012506540456012600 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { structure::structure() : Courant(0.5), v(D1) // Aaack, this is very hokey. { num_chunks = 0; num_effort_volumes = 0; effort_volumes = NULL; effort = NULL; outdir = "."; S = identity(); a = 1; dt = Courant/a; } typedef structure_chunk *structure_chunk_ptr; structure::structure(const grid_volume &thegv, material_function &eps, const boundary_region &br, const symmetry &s, int num, double Courant, bool use_anisotropic_averaging, double tol, int maxeval) : Courant(Courant), v(D1) // Aaack, this is very hokey. { outdir = "."; if (!br.check_ok(thegv)) abort("invalid boundary absorbers for this grid_volume"); choose_chunkdivision(thegv, num, br, s); set_materials(eps, use_anisotropic_averaging, tol, maxeval); } structure::structure(const grid_volume &thegv, double eps(const vec &), const boundary_region &br, const symmetry &s, int num, double Courant, bool use_anisotropic_averaging, double tol, int maxeval) : Courant(Courant), v(D1) // Aaack, this is very hokey. { outdir = "."; if (!br.check_ok(thegv)) abort("invalid boundary absorbers for this grid_volume"); choose_chunkdivision(thegv, num, br, s); simple_material_function epsilon(eps); set_materials(epsilon, use_anisotropic_averaging, tol, maxeval); } void structure::choose_chunkdivision(const grid_volume &thegv, int desired_num_chunks, const boundary_region &br, const symmetry &s) { user_volume = thegv; if (desired_num_chunks == 0) desired_num_chunks = count_processors(); if (thegv.dim == Dcyl && thegv.get_origin().r() < 0) abort("r < 0 origins are not supported"); gv = thegv; v = gv.surroundings(); S = s; a = gv.a; dt = Courant/a; // First, reduce overall grid_volume gv by symmetries: if (S.multiplicity() > 1) { bool break_this[3]; for (int dd=0;dd<3;dd++) { const direction d = (direction) dd; break_this[dd] = false; for (int n=0;ngv.dim, d) && s->user_volume.has_boundary(side, d) && s->user_volume.num_direction(d) > 1) { switch (kind) { case NOTHING_SPECIAL: break; case PML: s->use_pml(d, side, thickness); break; default: abort("unknown boundary region kind"); } } if (next) next->apply(s); } void boundary_region::apply(const structure *s, structure_chunk *sc) const { if (has_direction(s->gv.dim, d) && s->user_volume.has_boundary(side, d) && s->user_volume.num_direction(d) > 1) { switch (kind) { case NOTHING_SPECIAL: break; case PML: sc->use_pml(d, thickness, s->user_volume.boundary_location(side, d), Rasymptotic, mean_stretch, pml_profile, pml_profile_data, pml_profile_integral, pml_profile_integral_u); break; default: abort("unknown boundary region kind"); } } if (next) next->apply(s, sc); } bool boundary_region::check_ok(const grid_volume &gv) const { double thick[5][2]; FOR_DIRECTIONS(d) FOR_SIDES(s) thick[d][s] = 0; for (const boundary_region *r = this; r; r = r->next) { if (r->kind != NOTHING_SPECIAL && gv.num_direction(r->d) > 1 && has_direction(gv.dim, r->d) && gv.has_boundary(r->side, r->d)) { if (r->thickness < 0 || thick[r->d][r->side] > 0) return false; thick[r->d][r->side] = r->thickness; } } LOOP_OVER_DIRECTIONS(gv.dim,d) if (thick[d][High] + thick[d][Low] > gv.interior().in_direction(d)) return false; return true; } double pml_quadratic_profile(double u, void *d) { (void)d; return u * u; } boundary_region pml(double thickness, direction d, boundary_side side, double Rasymptotic, double mean_stretch) { return boundary_region(boundary_region::PML, thickness, Rasymptotic, mean_stretch, pml_quadratic_profile, NULL, 1./3., 1./4., d, side, NULL); } boundary_region pml(double thickness, direction d, double Rasymptotic, double mean_stretch) { return (pml(thickness, d, Low, Rasymptotic, mean_stretch) + pml(thickness, d, High, Rasymptotic, mean_stretch)); } boundary_region pml(double thickness, double Rasymptotic, double mean_stretch) { boundary_region r; for (int id = 0; id < 5; ++id) r = r + pml(thickness, (direction) id, Rasymptotic, mean_stretch); return r; } // First check that the chunk volumes do not intersect and that they add // up to the total grid_volume void structure::check_chunks() { grid_volume vol_intersection; for (int i=0; igv.intersect_with(chunks[j]->gv, &vol_intersection)) abort("chunks[%d] intersects with chunks[%d]\n", i, j); // FIXME: should use 'long long' else will fail if grid > 2e9 points int sum = 0; for (int i=0; igv.dim, d) grid_points *= chunks[i]->gv.num_direction(d); sum += grid_points; } int v_grid_points = 1; LOOP_OVER_DIRECTIONS(gv.dim, d) v_grid_points *= gv.num_direction(d); if (sum != v_grid_points) abort("v_grid_points = %d, sum(chunks) = %d\n", v_grid_points, sum); } void structure::add_to_effort_volumes(const grid_volume &new_effort_volume, double extra_effort) { grid_volume *temp_volumes = new grid_volume[(2*number_of_directions(gv.dim)+1)*num_effort_volumes]; double *temp_effort = new double[(2*number_of_directions(gv.dim)+1)*num_effort_volumes]; // Intersect previous mat_volumes with this new_effort_volume int counter = 0; for (int j=0; j 1) { printf("effort_volumes[%d] ", j); effort_volumes[j].print(); printf("new_effort_volume "); new_effort_volume.print(); // NOTE: this may not be a bug if this function is used for // something other than PML. abort("Did not expect num_others > 1 in add_to_effort_volumes\n"); } temp_effort[counter] = extra_effort + effort[j]; temp_volumes[counter] = intersection; counter++; for (int k = 0; kv) { num_chunks = s->num_chunks; outdir = s->outdir; gv = s->gv; S = s->S; user_volume = s->user_volume; chunks = new structure_chunk_ptr[num_chunks]; for (int i=0;ichunks[i]); num_effort_volumes = s->num_effort_volumes; effort_volumes = new grid_volume[num_effort_volumes]; effort = new double[num_effort_volumes]; for (int i=0;ieffort_volumes[i]; effort[i] = s->effort[i]; } a = s->a; Courant = s->Courant; dt = s->dt; } structure::structure(const structure &s) : v(s.v) { num_chunks = s.num_chunks; outdir = s.outdir; gv = s.gv; S = s.S; user_volume = s.user_volume; chunks = new structure_chunk_ptr[num_chunks]; for (int i=0;irefcount-- <= 1) delete chunks[i]; chunks[i] = NULL; // Just to be sure... } delete[] chunks; delete[] effort_volumes; delete[] effort; } /* To save memory, the structure chunks are shared with the fields_chunk objects instead of making a copy. However, to preserve the illusion that the structure and fields are independent objects, we implement copy-on-write semantics. */ void structure::changing_chunks() { // call this whenever chunks are modified for (int i=0; irefcount > 1) { // this chunk is shared, so make a copy chunks[i]->refcount--; chunks[i] = new structure_chunk(chunks[i]); } } void structure::set_materials(material_function &mat, bool use_anisotropic_averaging, double tol, int maxeval) { set_epsilon(mat, use_anisotropic_averaging, tol, maxeval); if (mat.has_mu()) set_mu(mat, use_anisotropic_averaging, tol, maxeval); FOR_D_AND_B(c) if (mat.has_conductivity(c)) set_conductivity(c, mat); FOR_E_AND_H(c) if (mat.has_chi3(c)) set_chi3(c, mat); FOR_E_AND_H(c) if (mat.has_chi2(c)) set_chi2(c, mat); } void structure::set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval) { changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi1inv(c, eps, use_anisotropic_averaging, tol, maxeval); } void structure::set_epsilon(material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval) { double tstart = wall_time(); FOR_ELECTRIC_COMPONENTS(c) set_chi1inv(c, eps, use_anisotropic_averaging, tol, maxeval); if (!quiet) master_printf("time for set_epsilon = %g s\n", wall_time() - tstart); } void structure::set_epsilon(double eps(const vec &), bool use_anisotropic_averaging, double tol, int maxeval) { simple_material_function epsilon(eps); set_epsilon(epsilon, use_anisotropic_averaging, tol, maxeval); } void structure::set_mu(material_function &m, bool use_anisotropic_averaging, double tol, int maxeval) { double tstart = wall_time(); FOR_MAGNETIC_COMPONENTS(c) set_chi1inv(c, m, use_anisotropic_averaging, tol, maxeval); if (!quiet) master_printf("time for set_mu = %g s\n", wall_time() - tstart); } void structure::set_mu(double mufunc(const vec &), bool use_anisotropic_averaging, double tol, int maxeval) { simple_material_function mu(mufunc); set_mu(mu, use_anisotropic_averaging, tol, maxeval); } void structure::set_conductivity(component c, material_function &C) { if (!gv.has_field(c)) return; double tstart = wall_time(); changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_conductivity(c, C); if (!quiet) master_printf("time for set_conductivity = %g s\n", wall_time() - tstart); } void structure::set_conductivity(component c, double Cfunc(const vec &)) { simple_material_function conductivity(Cfunc); set_conductivity(c, conductivity); } void structure::set_chi3(component c, material_function &eps) { if (!gv.has_field(c)) return; changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi3(c, eps); } void structure::set_chi3(material_function &eps) { FOR_ELECTRIC_COMPONENTS(c) set_chi3(c, eps); } void structure::set_chi3(double eps(const vec &)) { simple_material_function epsilon(eps); set_chi3(epsilon); } void structure::set_chi2(component c, material_function &eps) { changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi2(c, eps); } void structure::set_chi2(material_function &eps) { FOR_ELECTRIC_COMPONENTS(c) set_chi2(c, eps); } void structure::set_chi2(double eps(const vec &)) { simple_material_function epsilon(eps); set_chi2(epsilon); } void structure::add_susceptibility(double sigma(const vec &), field_type ft, const susceptibility &sus) { simple_material_function sig(sigma); add_susceptibility(sig, ft, sus); } void structure::add_susceptibility(material_function &sigma, field_type ft, const susceptibility &sus) { changing_chunks(); for (int i=0;iadd_susceptibility(sigma, ft, sus); /* Now, synchronize the trivial_sigma array among all chunks/processes. This will result in some "wasted" memory: if a particular polarization P is needed on *any* chunk, it will be allocated on *every* chunk. However, this greatly simplifies handling of boundary conditions between chunks; see also the susceptibility::needs_P function. (Note that the new susceptibility object was added to the beginning of each chunk's chiP[ft] list.) */ int trivial_sigma[NUM_FIELD_COMPONENTS][5]; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) trivial_sigma[c][d] = true; for (int i=0;ichiP[ft]; FOR_FT_COMPONENTS(ft,c) FOR_DIRECTIONS(d) trivial_sigma[c][d] = trivial_sigma[c][d] && newsus->trivial_sigma[c][d]; } int trivial_sigma_sync[NUM_FIELD_COMPONENTS][5]; and_to_all(&trivial_sigma[0][0], &trivial_sigma_sync[0][0], NUM_FIELD_COMPONENTS * 5); for (int i=0;ichiP[ft]; FOR_FT_COMPONENTS(ft,c) FOR_DIRECTIONS(d) newsus->trivial_sigma[c][d] = trivial_sigma_sync[c][d]; } } void structure::use_pml(direction d, boundary_side b, double dx) { if (dx <= 0.0) return; grid_volume pml_volume = gv; pml_volume.set_num_direction(d, int(dx*user_volume.a + 1 + 0.5)); //FIXME: exact value? if (b == High) pml_volume.set_origin(d, user_volume.big_corner().in_direction(d) - pml_volume.num_direction(d) * 2); const int v_to_user_shift = (user_volume.little_corner().in_direction(d) - gv.little_corner().in_direction(d)) / 2; if (b == Low && v_to_user_shift != 0) pml_volume.set_num_direction(d, pml_volume.num_direction(d) + v_to_user_shift); add_to_effort_volumes(pml_volume, 0.60); // FIXME: manual value for pml effort } bool structure::has_chi(component c, direction d) const { int i; for (i = 0; i < num_chunks && !chunks[i]->has_chi(c, d); i++) ; return or_to_all(i < num_chunks); } bool structure_chunk::has_chi(component c, direction d) const { return has_chisigma(c,d) || has_chi1inv(c, d); } bool structure_chunk::has_chisigma(component c, direction d) const { if (is_mine()) { for (susceptibility *sus = chiP[type(c)]; sus; sus = sus->next) if (sus->sigma[c][d] && !sus->trivial_sigma[c][d]) return true; } return false; } bool structure_chunk::has_chi1inv(component c, direction d) const { return is_mine() && chi1inv[c][d] && !trivial_chi1inv[c][d]; } void structure::mix_with(const structure *oth, double f) { if (num_chunks != oth->num_chunks) abort("You can't phase materials with different chunk topologies...\n"); changing_chunks(); for (int i=0;iis_mine()) chunks[i]->mix_with(oth->chunks[i], f); } structure_chunk::~structure_chunk() { FOR_COMPONENTS(c) { FOR_DIRECTIONS(d) { delete[] chi1inv[c][d]; delete[] conductivity[c][d]; delete[] condinv[c][d]; } delete[] chi2[c]; delete[] chi3[c]; } FOR_DIRECTIONS(d) { delete[] sig[d]; delete[] kap[d]; delete[] siginv[d]; } FOR_FIELD_TYPES(ft) { delete chiP[ft]; } } void structure_chunk::mix_with(const structure_chunk *n, double f) { FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { if (!chi1inv[c][d] && n->chi1inv[c][d]) { chi1inv[c][d] = new realnum[gv.ntot()]; trivial_chi1inv[c][d] = n->trivial_chi1inv[c][d]; if (component_direction(c) == d) // diagonal components = 1 by default for (int i=0;iconductivity[c][d]) { conductivity[c][d] = new realnum[gv.ntot()]; for (int i=0;itrivial_chi1inv[c][d]; if (n->chi1inv[c][d]) for (int i=0;ichi1inv[c][d][i] - chi1inv[c][d][i]); else { double nval = component_direction(c) == d ? 1.0 : 0.0; // default for (int i=0;iconductivity[c][d]) for (int i=0;iconductivity[c][d][i] - conductivity[c][d][i]); else for (int i=0;i 0" is computed below. bool found_pml = false; for (int i=gv.little_corner().in_direction(d); i<=gv.big_corner().in_direction(d)+1;++i) if (pml_x(i, dx, bloc, a) > 0) { found_pml = true; break; } if (!found_pml) return; if (is_mine()) { if (sig[d]) { delete[] sig[d]; delete[] kap[d]; delete[] siginv[d]; sig[d] = kap[d] = NULL; siginv[d] = NULL; } LOOP_OVER_FIELD_DIRECTIONS(gv.dim, dd) { if (!sig[dd]) { int spml = (dd==d)?(2*gv.num_direction(d)+2):1; sigsize[dd] = spml; sig[dd] = new double[spml]; kap[dd] = new double[spml]; siginv[dd] = new double[spml]; for (int i=0;i 0) { double s = pml_profile(x/dx, pml_profile_data); sig[d][idx]=0.5*dt*prefac*s; kap[d][idx] = 1 + kappa_prefac*s*(x/dx); siginv[d][idx] = 1/(kap[d][idx]+sig[d][idx]); } } } condinv_stale = true; } void structure_chunk::update_condinv() { if (!condinv_stale || !is_mine()) return; FOR_COMPONENTS(c) { direction d = component_direction(c); if (conductivity[c][d]) { if (!condinv[c][d]) condinv[c][d] = new realnum[gv.ntot()]; LOOP_OVER_VOL(gv, c, i) condinv[c][d][i] = 1 / (1 + conductivity[c][d][i] * dt * 0.5); } else if (condinv[c][d]) { // condinv not needed delete[] condinv[c][d]; condinv[c][d] = NULL; } } condinv_stale = false; } structure_chunk::structure_chunk(const structure_chunk *o) : v(o->v) { refcount = 1; FOR_FIELD_TYPES(ft) { { susceptibility *cur = NULL; for (const susceptibility *ocur = o->chiP[ft]; ocur; ocur = ocur->next) { if (cur) { cur->next = ocur->clone(); cur = cur->next; } else { chiP[ft] = cur = ocur->clone(); } cur->next = NULL; } } } a = o->a; Courant = o->Courant; dt = o->dt; gv = o->gv; the_proc = o->the_proc; the_is_mine = my_rank() == n_proc(); FOR_COMPONENTS(c) { if (is_mine() && o->chi3[c]) { chi3[c] = new realnum[gv.ntot()]; if (chi3[c] == NULL) abort("Out of memory!\n"); for (int i=0;ichi3[c][i]; } else { chi3[c] = NULL; } if (is_mine() && o->chi2[c]) { chi2[c] = new realnum[gv.ntot()]; if (chi2[c] == NULL) abort("Out of memory!\n"); for (int i=0;ichi2[c][i]; } else { chi2[c] = NULL; } } FOR_COMPONENTS(c) FOR_DIRECTIONS(d) trivial_chi1inv[c][d] = true; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) if (is_mine()) { trivial_chi1inv[c][d] = o->trivial_chi1inv[c][d]; if (o->chi1inv[c][d]) { chi1inv[c][d] = new realnum[gv.ntot()]; memcpy(chi1inv[c][d], o->chi1inv[c][d], gv.ntot()*sizeof(realnum)); } else chi1inv[c][d] = NULL; if (o->conductivity[c][d]) { conductivity[c][d] = new realnum[gv.ntot()]; memcpy(conductivity[c][d], o->conductivity[c][d], gv.ntot()*sizeof(realnum)); condinv[c][d] = new realnum[gv.ntot()]; memcpy(condinv[c][d], o->condinv[c][d], gv.ntot()*sizeof(realnum)); } else conductivity[c][d] = condinv[c][d] = NULL; } condinv_stale = o->condinv_stale; // Allocate the PML conductivity arrays: FOR_DIRECTIONS(d) { sig[d] = NULL; kap[d] = NULL; siginv[d] = NULL; sigsize[d] = 0; } for (int i=0;i<5;++i) sigsize[i] = 0; // Copy over the PML conductivity arrays: if (is_mine()) FOR_DIRECTIONS(d) if (o->sig[d]) { sig[d] = new double[2*gv.num_direction(d)+1]; kap[d] = new double[2*gv.num_direction(d)+1]; siginv[d] = new double[2*gv.num_direction(d)+1]; sigsize[d] = o->sigsize[d]; for (int i=0;i<2*gv.num_direction(d)+1;i++) { sig[d][i] = o->sig[d][i]; kap[d][i] = o->kap[d][i]; siginv[d][i] = o->siginv[d][i]; } } } void structure_chunk::set_chi3(component c, material_function &epsilon) { if (!is_mine() || !gv.has_field(c)) return; if (!is_electric(c) && !is_magnetic(c)) abort("only E or H can have chi3"); epsilon.set_volume(gv.pad().surroundings()); if (!chi1inv[c][component_direction(c)]) { // require chi1 if we have chi3 chi1inv[c][component_direction(c)] = new realnum[gv.ntot()]; for (int i = 0; i < gv.ntot(); ++i) chi1inv[c][component_direction(c)][i] = 1.0; } if (!chi3[c]) chi3[c] = new realnum[gv.ntot()]; bool trivial = true; LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); chi3[c][i] = epsilon.chi3(c, here); trivial = trivial && (chi3[c][i] == 0.0); } /* currently, our update_e_from_d routine requires that chi2 be present if chi3 is, and vice versa */ if (!chi2[c]) { if (!trivial) { chi2[c] = new realnum[gv.ntot()]; memset(chi2[c], 0, gv.ntot() * sizeof(realnum)); // chi2 = 0 } else { // no chi3, and chi2 is trivial (== 0), so delete delete[] chi3[c]; chi3[c] = NULL; } } epsilon.unset_volume(); } void structure_chunk::set_chi2(component c, material_function &epsilon) { if (!is_mine() || !gv.has_field(c)) return; if (!is_electric(c) && !is_magnetic(c)) abort("only E or H can have chi2"); epsilon.set_volume(gv.pad().surroundings()); if (!chi1inv[c][component_direction(c)]) { // require chi1 if we have chi2 chi1inv[c][component_direction(c)] = new realnum[gv.ntot()]; for (int i = 0; i < gv.ntot(); ++i) chi1inv[c][component_direction(c)][i] = 1.0; } if (!chi2[c]) chi2[c] = new realnum[gv.ntot()]; bool trivial = true; LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); chi2[c][i] = epsilon.chi2(c, here); trivial = trivial && (chi2[c][i] == 0.0); } /* currently, our update_e_from_d routine requires that chi3 be present if chi2 is, and vice versa */ if (!chi3[c]) { if (!trivial) { chi3[c] = new realnum[gv.ntot()]; memset(chi3[c], 0, gv.ntot() * sizeof(realnum)); // chi3 = 0 } else { // no chi2, and chi3 is trivial (== 0), so delete delete[] chi2[c]; chi2[c] = NULL; } } epsilon.unset_volume(); } void structure_chunk::set_conductivity(component c, material_function &C) { if (!is_mine() || !gv.has_field(c)) return; C.set_volume(gv.pad().surroundings()); if (!is_electric(c) && !is_magnetic(c) && !is_D(c) && !is_B(c)) abort("invalid component for conductivity"); direction c_d = component_direction(c); component c_C = is_electric(c) ? direction_component(Dx, c_d) : (is_magnetic(c) ? direction_component(Bx, c_d) : c); realnum *multby = is_electric(c) || is_magnetic(c) ? chi1inv[c][c_d] : 0; if (!conductivity[c_C][c_d]) conductivity[c_C][c_d] = new realnum[gv.ntot()]; if (!conductivity[c_C][c_d]) abort("Memory allocation error.\n"); bool trivial = true; realnum *cnd = conductivity[c_C][c_d]; if (multby) { LOOP_OVER_VOL(gv, c_C, i) { IVEC_LOOP_LOC(gv, here); cnd[i] = C.conductivity(c, here) * multby[i]; trivial = trivial && (cnd[i] == 0.0); } } else { LOOP_OVER_VOL(gv, c_C, i) { IVEC_LOOP_LOC(gv, here); cnd[i] = C.conductivity(c, here); trivial = trivial && (cnd[i] == 0.0); } } if (trivial) { // skip conductivity computations if conductivity == 0 delete[] conductivity[c_C][c_d]; conductivity[c_C][c_d] = NULL; } condinv_stale = true; C.unset_volume(); } structure_chunk::structure_chunk(const grid_volume &thegv, const volume &vol_limit, double Courant, int pr) : Courant(Courant), v(thegv.surroundings() & vol_limit) { refcount = 1; pml_fmin = 0.2; FOR_FIELD_TYPES(ft) { chiP[ft] = NULL; } gv = thegv; a = thegv.a; dt = Courant/a; the_proc = pr; the_is_mine = n_proc() == my_rank(); // initialize materials arrays to NULL FOR_COMPONENTS(c) chi3[c] = NULL; FOR_COMPONENTS(c) chi2[c] = NULL; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { trivial_chi1inv[c][d] = true; chi1inv[c][d] = NULL; conductivity[c][d] = NULL; condinv[c][d] = NULL; } condinv_stale = false; FOR_DIRECTIONS(d) { sig[d] = NULL; kap[d] = NULL; siginv[d] = NULL; sigsize[d] = 0; } } double structure::max_eps() const { double themax = 0.0; for (int i=0;iis_mine()) themax = max(themax,chunks[i]->max_eps()); return max_to_all(themax); } double fields::max_eps() const { double themax = 0.0; for (int i=0;iis_mine()) themax = max(themax,chunks[i]->s->max_eps()); return max_to_all(themax); } double structure_chunk::max_eps() const { double themax = 0.0; FOR_COMPONENTS(c) { direction d = component_direction(c); if (chi1inv[c][d]) for (int i=0;ia != s.chunks[i]->a || chunks[i]->v != s.chunks[i]->v) return false; return true; } void structure_chunk::remove_susceptibilities() { FOR_FIELD_TYPES(ft) { delete chiP[ft]; chiP[ft] = NULL; } } void structure::remove_susceptibilities() { changing_chunks(); for (int i=0;iremove_susceptibilities(); } // for debugging, display the chunk layout void structure::print_layout(void) const { direction d0 = gv.yucky_direction(0); direction d1 = gv.yucky_direction(1); direction d2 = gv.yucky_direction(2); for (int i = 0; i < num_chunks; ++i) { master_printf("chunk[%d] on process %d, resolution %g (%s,%s,%s):" " (%d,%d,%d) - (%d,%d,%d)\n", i, chunks[i]->n_proc(), chunks[i]->a, direction_name(d0),direction_name(d1),direction_name(d2), chunks[i]->gv.little_corner().yucky_val(0), chunks[i]->gv.little_corner().yucky_val(1), chunks[i]->gv.little_corner().yucky_val(2), chunks[i]->gv.big_corner().yucky_val(0), chunks[i]->gv.big_corner().yucky_val(1), chunks[i]->gv.big_corner().yucky_val(2)); } } } // namespace meep meep-1.3/src/energy_and_flux.cpp0000644000175400001440000002453012506540456013703 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { /* Energy calculation */ double fields::count_volume(component c) { double vol = 0; for (int i=0;iis_mine()) vol += chunks[i]->count_volume(c); return sum_to_all(vol); } double fields_chunk::count_volume(component c) { double vol = 0; for (int i=0;i dot_integrand(const complex *fields, const vec &loc, void *data_) { (void) loc; (void) data_; // unused; return real(conj(fields[0]) * fields[1]); } double fields::field_energy_in_box(component c, const volume &where) { if (coordinate_mismatch(gv.dim, c)) return 0.0; component cs[2]; if (is_electric(c) || is_D(c)) { cs[0] = direction_component(Ex, component_direction(c)); cs[1] = direction_component(Dx, component_direction(c)); } else if (is_magnetic(c) || is_B(c)) { cs[0] = direction_component(Hx, component_direction(c)); cs[1] = direction_component(Bx, component_direction(c)); } else abort("invalid field component in field_energy_in_box"); return real(integrate(2, cs, dot_integrand, 0, where)) * 0.5; } double fields::electric_energy_in_box(const volume &where) { long double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) sum += field_energy_in_box(c, where); return sum; } double fields::magnetic_energy_in_box(const volume &where) { long double sum = 0.0; FOR_MAGNETIC_COMPONENTS(c) sum += field_energy_in_box(c, where); return sum; } void fields_chunk::backup_component(component c) { DOCMP { if (c < NUM_FIELD_COMPONENTS && f[c][cmp] && // in mu=1 regions where H==B, don't bother to backup H !(is_magnetic(c) && f[c][cmp] == f[direction_component(Bx, component_direction(c))][cmp])) { #define BACKUP(f) if (f[c][cmp]) { \ if (!f##_backup[c][cmp]) \ f##_backup[c][cmp] = new realnum[gv.ntot()]; \ memcpy(f##_backup[c][cmp], f[c][cmp], gv.ntot()*sizeof(realnum)); } BACKUP(f); BACKUP(f_u); BACKUP(f_w); BACKUP(f_cond); #undef BACKUP } } } void fields_chunk::restore_component(component c) { DOCMP if (f_backup[c][cmp]) { #define RESTORE(f) \ if (f[c][cmp]) \ memcpy(f[c][cmp], f##_backup[c][cmp], gv.ntot()*sizeof(realnum)); RESTORE(f); RESTORE(f_u); RESTORE(f_w); RESTORE(f_cond); #undef RESTORE } } void fields_chunk::average_with_backup(component c) { DOCMP { realnum *fc = f[c][cmp]; realnum *backup = f_backup[c][cmp]; if (fc && backup) for (int i = 0; i < gv.ntot(); i++) fc[i] = 0.5 * (fc[i] + backup[i]); } } void fields::synchronize_magnetic_fields() { if (synchronized_magnetic_fields++) return; // already synched for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->backup_component(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->backup_component(c); } am_now_working_on(Stepping); calc_sources(time()); // for B sources step_db(B_stuff); step_source(B_stuff); step_boundaries(B_stuff); calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); step_boundaries(H_stuff); finished_working(); for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->average_with_backup(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->average_with_backup(c); } } void fields::restore_magnetic_fields() { if (!synchronized_magnetic_fields // already restored || --synchronized_magnetic_fields) // not ready to restore yet return; for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->restore_component(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->restore_component(c); } } double fields::thermo_energy_in_box(const volume &where) { long double sum = 0.0; (void) where; // unused abort("thermo_energy_in_box no longer supported"); return sum_to_all(sum); } /* Compute ExH integral in box using current fields, ignoring fact that this E and H correspond to different times. */ double fields::flux_in_box_wrongH(direction d, const volume &where) { if (coordinate_mismatch(gv.dim, d)) return 0.0; component cE[2], cH[2]; switch (d) { case X: cE[0] = Ey, cE[1] = Ez, cH[0] = Hz, cH[1] = Hy; break; case Y: cE[0] = Ez, cE[1] = Ex, cH[0] = Hx, cH[1] = Hz; break; case R: cE[0] = Ep, cE[1] = Ez, cH[0] = Hz, cH[1] = Hp; break; case P: cE[0] = Ez, cE[1] = Er, cH[0] = Hr, cH[1] = Hz; break; case Z: if (gv.dim == Dcyl) cE[0] = Er, cE[1] = Ep, cH[0] = Hp, cH[1] = Hr; else cE[0] = Ex, cE[1] = Ey, cH[0] = Hy, cH[1] = Hx; break; case NO_DIRECTION: abort("cannot get flux in NO_DIRECTION"); } long double sum = 0.0; for (int i = 0; i < 2; ++i) { component cs[2]; cs[0] = cE[i]; cs[1] = cH[i]; sum += real(integrate(2, cs, dot_integrand, 0, where)) * (1 - 2*i); } return sum; } double fields::flux_in_box(direction d, const volume &where) { synchronize_magnetic_fields(); double cur_step_flux = flux_in_box_wrongH(d, where); restore_magnetic_fields(); return cur_step_flux; } flux_vol *fields::add_flux_vol(direction d, const volume &where) { if (where.dim != gv.dim) abort("invalid dimensionality in add_flux_vol"); if (d == NO_DIRECTION || coordinate_mismatch(gv.dim, d)) abort("invalid direction in add_flux_vol"); return new flux_vol(this, d, where); } // As add_flux_vol, but infer direction from where (if possible) flux_vol *fields::add_flux_plane(const volume &where) { return add_flux_vol(where.normal_direction(), where); } flux_vol *fields::add_flux_plane(const vec &p1, const vec &p2) { return add_flux_plane(volume(p1, p2)); } /************************************************************************/ /* Note that computation of modal grid_volume by this definition is somewhat problematic computationally, because we need to compute max|D*E|, which requires averaging discontinuous functions. Hence, except for the special case of 2d TM polarization, the computed value tends to have a large error bar if the maximum lies on a dielectric boundary as it commonly does. A better method would be to average only continuous quantities in order to compute the fields on the Centered grid, but this is more expensive and requires us to know the boundary orientation, and does not seem worth the trouble at this point. */ static complex dot3_max_integrand(const complex *fields, const vec &loc, void *data_) { (void) loc; (void) data_; // unused; return (real(conj(fields[0]) * fields[3]) + real(conj(fields[1]) * fields[4]) + real(conj(fields[2]) * fields[5])); } double fields::electric_energy_max_in_box(const volume &where) { component cs[6]; if (gv.dim == Dcyl) { cs[0] = Er; cs[1] = Ep; cs[2] = Ez; cs[3+0] = Dr; cs[3+1] = Dp; cs[3+2] = Dz; } else { cs[0] = Ex; cs[1] = Ey; cs[2] = Ez; cs[3+0] = Dx; cs[3+1] = Dy; cs[3+2] = Dz; } return max_abs(6, cs, dot3_max_integrand, 0, where) * 0.5; } /* "modal" grid_volume according to definition in: E. M. Purcell, Phys. Rev. B 69, 681 (1946). (based on spontaneous emission enhancement). */ double fields::modal_volume_in_box(const volume &where) { return electric_energy_in_box(where) / electric_energy_max_in_box(where); } /************************************************************************/ /* compute integral f(x) * Re[conj(f1)*f2] * 0.5, which is useful for perturbation theory, etcetera, where f1 and f2 are two field components on the same Yee lattice (e.g. Hx and Hx or Ex and Dx). */ typedef double (*fx_func)(const vec &); static complex dot_fx_integrand(const complex *fields, const vec &loc, void *data_) { fx_func fx = (fx_func) data_; return (real(conj(fields[0]) * fields[1]) * fx(loc)); } /* computes integral of f(x) * |E|^2 / integral epsilon*|E|^2 */ double fields::electric_sqr_weighted_integral(double (*f)(const vec &), const volume &where) { double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) if (!coordinate_mismatch(gv.dim, component_direction(c))) { component cs[2]; cs[0] = cs[1] = direction_component(Ex, component_direction(c)); sum += real(integrate(2, cs, dot_fx_integrand, (void *) f, where)); } return sum * 0.5 / electric_energy_in_box(where); } /* computes integral of f(x) * epsilon*|E|^2 / integral epsilon*|E|^2 */ double fields::electric_energy_weighted_integral(double (*f)(const vec &), const volume &where) { double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) if (!coordinate_mismatch(gv.dim, component_direction(c))) { component cs[2]; cs[0] = direction_component(Ex, component_direction(c)); cs[1] = direction_component(Dx, component_direction(c)); sum += real(integrate(2, cs, dot_fx_integrand, (void *) f, where)); } return sum * 0.5 / electric_energy_in_box(where); } } // namespace meep meep-1.3/src/vec.cpp0000644000175400001440000012703012506540456011306 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep_internals.hpp" using namespace std; namespace meep { ivec grid_volume::round_vec(const vec &p) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.set_direction(d, my_round(p.in_direction(d) * 2 * a)); return result; } void grid_volume::set_origin(const ivec &o) { io = o; origin = operator[](io); // adjust origin to match io } void grid_volume::set_origin(direction d, int o) { io.set_direction(d, o); origin = operator[](io); // adjust origin to match io } void grid_volume::set_origin(const vec &o) { set_origin(round_vec(o)); } const char *dimension_name(ndim dim) { switch (dim) { case D1: return "1D"; case D2: return "2D"; case D3: return "3D"; case Dcyl: return "Cylindrical"; } return "Error in dimension_name"; } const char *direction_name(direction d) { switch (d) { case X: return "x"; case Y: return "y"; case Z: return "z"; case R: return "r"; case P: return "phi"; case NO_DIRECTION: return "no_direction"; } return "Error in direction_name"; } const char *component_name(component c) { if (is_derived(int(c))) return component_name(derived_component(c)); switch (c) { case Er: return "er"; case Ep: return "ep"; case Ez: return "ez"; case Hr: return "hr"; case Hp: return "hp"; case Hz: return "hz"; case Ex: return "ex"; case Ey: return "ey"; case Hx: return "hx"; case Hy: return "hy"; case Dx: return "dx"; case Dy: return "dy"; case Dz: return "dz"; case Dr: return "dr"; case Dp: return "dp"; case Bx: return "bx"; case By: return "by"; case Bz: return "bz"; case Br: return "br"; case Bp: return "bp"; case Dielectric: return "eps"; case Permeability: return "mu"; } return "Error in component_name"; } const char *component_name(derived_component c) { if (!is_derived(int(c))) return component_name(component(c)); switch (c) { case Sr: return "sr"; case Sp: return "sp"; case Sz: return "sz"; case Sx: return "sx"; case Sy: return "sy"; case EnergyDensity: return "energy"; case D_EnergyDensity: return "denergy"; case H_EnergyDensity: return "henergy"; } return "Error in component_name"; } const char *component_name(int c) { return (is_derived(c) ? component_name(derived_component(c)) : component_name(component(c))); } component first_field_component(field_type ft) { switch (ft) { case E_stuff: return Ex; case H_stuff: return Hx; case D_stuff: return Dx; case B_stuff: return Bx; default: abort("bug - only E/H/D/B stuff have components"); } } vec min(const vec &vec1, const vec &vec2) { vec m(vec1.dim); LOOP_OVER_DIRECTIONS(vec1.dim, d) m.set_direction(d, min(vec1.in_direction(d), vec2.in_direction(d))); return m; } vec max(const vec &vec1, const vec &vec2) { vec m(vec1.dim); LOOP_OVER_DIRECTIONS(vec1.dim, d) m.set_direction(d, max(vec1.in_direction(d), vec2.in_direction(d))); return m; } ivec min(const ivec &ivec1, const ivec &ivec2) { ivec m(ivec1.dim); LOOP_OVER_DIRECTIONS(ivec1.dim, d) m.set_direction(d, min(ivec1.in_direction(d), ivec2.in_direction(d))); return m; } ivec max(const ivec &ivec1, const ivec &ivec2) { ivec m(ivec1.dim); LOOP_OVER_DIRECTIONS(ivec1.dim, d) m.set_direction(d, max(ivec1.in_direction(d), ivec2.in_direction(d))); return m; } volume::volume(const vec &vec1, const vec &vec2) { min_corner = min(vec1, vec2); max_corner = max(vec1, vec2); dim = vec1.dim; } volume::volume(const vec &pt) { dim = pt.dim; min_corner = pt; max_corner = pt; } double volume::computational_volume() const { double vol = 1.0; LOOP_OVER_DIRECTIONS(dim,d) vol *= in_direction(d); return vol; } double volume::integral_volume() const { double vol = 1.0; LOOP_OVER_DIRECTIONS(dim, d) if (in_direction(d) != 0.0) vol *= in_direction(d); if (dim == Dcyl) vol *= pi * (in_direction_max(R) + in_direction_min(R)); return vol; } double volume::full_volume() const { double vol = computational_volume(); if (dim == Dcyl) vol *= pi * (in_direction_max(R) + in_direction_min(R)); return vol; } double volume::diameter() const { double diam = 0.0; LOOP_OVER_DIRECTIONS(dim,d) { diam = max(diam, in_direction(d)); } return diam; } volume volume::intersect_with(const volume &a) const { if (a.dim != dim) abort("Can't intersect volumes of dissimilar dimensions.\n"); volume result(dim); LOOP_OVER_DIRECTIONS(dim, d) { double minval = max(in_direction_min(d), a.in_direction_min(d)); double maxval = min(in_direction_max(d), a.in_direction_max(d)); if (minval > maxval) return volume(zero_vec(dim), zero_vec(dim)); result.set_direction_min(d, minval); result.set_direction_max(d, maxval); } return result; } bool volume::intersects(const volume &a) const { if (a.dim != dim) abort("Can't intersect volumes of dissimilar dimensions.\n"); LOOP_OVER_DIRECTIONS(dim, d) { double minval = max(in_direction_min(d), a.in_direction_min(d)); double maxval = min(in_direction_max(d), a.in_direction_max(d)); if (minval > maxval) return false; } return true; } // Return normal direction to grid_volume, if the grid_volume is dim-1 dimensional; // otherwise, return NO_DIRECTION. direction volume::normal_direction() const { direction d = NO_DIRECTION; switch (dim) { case D1: d = Z; break; case D2: if (in_direction(X) == 0 && in_direction(Y) > 0) d = X; else if (in_direction(X) > 0 && in_direction(Y) == 0) d = Y; break; case Dcyl: if (in_direction(R) == 0 && in_direction(Z) > 0) d = R; else if (in_direction(R) > 0 && in_direction(Z) == 0) d = Z; break; case D3: { bool zx = in_direction(X) == 0; bool zy = in_direction(Y) == 0; bool zz = in_direction(Z) == 0; if (zx && !zy && !zz) d = X; else if (!zx && zy && !zz) d = Y; else if (!zx && !zy && zz) d = Z; break; } } return d; } /* Used for n=0,1,2 nested loops in macros. We should arrange the ordering so that this gives most efficient traversal of a field array, where n=2 is the innermost loop. */ static direction yucky_dir(ndim dim, int n) { if (dim == Dcyl) switch (n) { case 0: return P; case 1: return R; case 2: return Z; } else if (dim == D2) return (direction) ((n + 2) % 3); /* n = 0,1,2 gives Z, X, Y */ return (direction) n ; } int ivec::yucky_val(int n) const { if (has_direction(dim, yucky_dir(dim, n))) return in_direction(yucky_dir(dim, n)); return 0; } int grid_volume::yucky_num(int n) const { if (has_direction(dim, yucky_dir(dim, n))) return num_direction(yucky_dir(dim, n)); return 1; } direction grid_volume::yucky_direction(int n) const { return yucky_dir(dim, n); } volume grid_volume::surroundings() const { return volume(operator[](little_corner()), operator[](big_corner())); } volume grid_volume::interior() const { return volume(operator[](little_corner()), operator[](big_corner() - one_ivec(dim) * 2)); } void grid_volume::update_ntot() { the_ntot = 1; LOOP_OVER_DIRECTIONS(dim, d) the_ntot *= num[d%3] + 1; } void grid_volume::set_num_direction(direction d, int value) { num[d%3] = value; num_changed(); } grid_volume::grid_volume(ndim td, double ta, int na, int nb, int nc) { dim = td; a = ta; inva = 1.0 / ta; num[0] = na; num[1] = nb; num[2] = nc; num_changed(); set_origin(zero_vec(dim)); } component grid_volume::eps_component() const { switch (dim) { case D1: return Hy; case D2: return Hz; case D3: return Dielectric; case Dcyl: return Hp; } abort("Unsupported dimensionality eps.\n"); return Ex; } vec grid_volume::yee_shift(component c) const { return operator[](iyee_shift(c)); } /* Return array offsets to average with a given array location of c in order to get c on the "centered" grid. Then, to get the centered grid point i, you should average c over the four locations: i, i+offset1, i+offset2, i+offset1+offset2. (offset2, and possibly offset1, may be zero if only 2 or 1 locations need to be averaged). */ void grid_volume::yee2cent_offsets(component c, int &offset1, int &offset2) const { offset1 = offset2 = 0; LOOP_OVER_DIRECTIONS(dim,d) { if (!iyee_shift(c).in_direction(d)) { if (offset2) abort("weird yee shift for component %s", component_name(c)); if (offset1) offset2 = stride(d); else offset1 = stride(d); } } } /* Same as yee2cent_offsets, but averages centered grid to get c */ void grid_volume::cent2yee_offsets(component c, int &offset1, int &offset2) const { yee2cent_offsets(c, offset1, offset2); offset1 = -offset1; offset2 = -offset2; } bool volume::contains(const vec &p) const { LOOP_OVER_DIRECTIONS(dim,d) { if (p.in_direction(d) > in_direction_max(d) || p.in_direction(d) < in_direction_min(d)) return false; } return true; } bool volume::contains(const volume &a) const { return contains(a.get_min_corner()) && contains(a.get_max_corner()); } bool grid_volume::contains(const ivec &p) const { // containts returns true if the grid_volume has information about this grid // point. const ivec o = p - io; LOOP_OVER_DIRECTIONS(dim, d) if (o.in_direction(d) < 0 || o.in_direction(d) >= (num_direction(d)+1)*2) return false; return true; } bool grid_volume::contains(const vec &p) const { // containts returns true if the grid_volume has any information in it // relevant to the point p. Basically has is like owns (see below) // except it is more lenient, in that more than one lattice may contain a // given point. const vec o = p - origin; LOOP_OVER_DIRECTIONS(dim, d) if (o.in_direction(d) < -inva || o.in_direction(d) > num_direction(d)*inva+inva) return false; return true; } /* Compute the corners (cs,ce) of the ib-th boundary for component c, returning true if ib is a valid index (ib = 0..#boundaries-1). The boundaries are all the points that are in but not owned by the grid_volume, and are a set of *disjoint* regions. The main purpose of this function is currently to support the LOOP_OVER_NOT_OWNED macro. (In the future, it may be used for other boundary-element-type computations, too.) */ bool grid_volume::get_boundary_icorners(component c, int ib, ivec *cs, ivec *ce) const { ivec cl(little_corner() + iyee_shift(c)); ivec cb(big_corner() + iyee_shift(c)); ivec clo(little_owned_corner(c)); ivec cbo(big_corner() - iyee_shift(c)); *cs = cl; *ce = cb; bool ib_found = false; int jb = 0; LOOP_OVER_DIRECTIONS(dim, d) { if (cl.in_direction(d) < clo.in_direction(d)) { if (jb == ib) { ce->set_direction(d, cs->in_direction(d)); ib_found = true; break; } cs->set_direction(d, clo.in_direction(d)); jb++; } if (cb.in_direction(d) > cbo.in_direction(d)) { if (jb == ib) { cs->set_direction(d, ce->in_direction(d)); ib_found = true; break; } ce->set_direction(d, cbo.in_direction(d)); jb++; } } if (!ib_found) { // yucky interaction here with LOOP_OVER_VOL_NOTOWNED *cs = one_ivec(dim); *ce = -one_ivec(dim); } return ib_found; } // first "owned" point for c in grid_volume (see also grid_volume::owns) ivec grid_volume::little_owned_corner(component c) const { ivec iloc(little_owned_corner0(c)); if (dim == Dcyl && origin.r() == 0.0 && iloc.r() == 2) iloc.set_direction(R, 0); return iloc; } int grid_volume::nowned(component c) const { int n = 1; ivec pt = big_corner() - little_owned_corner(c); LOOP_OVER_DIRECTIONS(dim, d) n *= pt.in_direction(d) / 2 + 1; return n; } bool grid_volume::owns(const ivec &p) const { // owns returns true if the point "owned" by this grid_volume, meaning that it // is the grid_volume that would timestep the point. const ivec o = p - io; if (dim == Dcyl) { if (origin.r() == 0.0 && o.z() > 0 && o.z() <= nz()*2 && o.r() == 0) return true; return o.r() > 0 && o.z() > 0 && o.r() <= nr()*2 && o.z() <= nz()*2; } else if (dim == D3) { return o.x() > 0 && o.x() <= nx()*2 && o.y() > 0 && o.y() <= ny()*2 && o.z() > 0 && o.z() <= nz()*2; } else if (dim == D2) { return o.x() > 0 && o.x() <= nx()*2 && o.y() > 0 && o.y() <= ny()*2; } else if (dim == D1) { return o.z() > 0 && o.z() <= nz()*2; } else { abort("Unsupported dimension in owns.\n"); return false; } } int grid_volume::has_boundary(boundary_side b,direction d) const { switch (dim) { case Dcyl: return d == Z || (d == R && (b == High || get_origin().r() > 0)); case D1: return d == Z; case D2: return d == X || d == Y; case D3: return d == X || d == Y || d == Z; } return 0; // This should never be reached. } int grid_volume::index(component c, const ivec &p) const { const ivec offset = p - io - iyee_shift(c); int idx = 0; LOOP_OVER_DIRECTIONS(dim,d) idx += offset.in_direction(d)/2*stride(d); return idx; } void grid_volume::set_strides() { FOR_DIRECTIONS(d) the_stride[d] = 0; // Yuck yuck yuck. LOOP_OVER_DIRECTIONS(dim,d) switch(d) { case Z: the_stride[d] = 1; break; case R: the_stride[d] = nz()+1; break; case X: the_stride[d] = (nz()+1)*(ny() + 1); break; case Y: the_stride[d] = nz() + 1; break; case P: break; // There is no phi stride... case NO_DIRECTION: break; // no stride here, either } } static inline void stupidsort(int *ind, double *w, int l) { while (l) { if (fabs(w[0]) < 2e-15) { w[0] = w[l-1]; ind[0] = ind[l-1]; w[l-1] = 0.0; ind[l-1] = 0; } else { w += 1; ind += 1; } l -= 1; } } static inline void stupidsort(ivec *locs, double *w, int l) { while (l) { if (fabs(w[0]) < 2e-15) { w[0] = w[l-1]; locs[0] = locs[l-1]; w[l-1] = 0.0; locs[l-1] = 0; } else { w += 1; locs += 1; } l -= 1; } } void grid_volume::interpolate(component c, const vec &p, int indices[8], double weights[8]) const { ivec locs[8]; interpolate(c, p, locs, weights); for (int i=0;i<8&&weights[i];i++) if (!owns(locs[i])) weights[i] = 0.0; stupidsort(locs, weights, 8); for (int i=0;i<8&&weights[i];i++) indices[i] = index(c, locs[i]); if (!contains(p) && weights[0]) { printf("Error at point %g %g\n", p.r(), p.z()); printf("Interpolated to point %d %d\n", locs[0].r(), locs[0].z()); printf("Or in other words... %g %g\n", operator[](locs[0]).r(), operator[](locs[0]).z()); printf("I %s own the interpolated point.\n", owns(locs[0])?"actually":"don't"); print(); abort("Error made in interpolation of %s--fix this bug!!!\n", component_name(c)); } // Throw out out of range indices: for (int i=0;i<8&&weights[i];i++) if (indices[0] < 0 || indices[0] >= ntot()) weights[i] = 0.0; // Stupid very crude code to compactify arrays: stupidsort(indices, weights, 8); if (!contains(p) && weights[0]) { printf("Error at point %g %g\n", p.r(), p.z()); printf("Interpolated to point %d %d\n", locs[0].r(), locs[0].z()); print(); abort("Error made in interpolation of %s--fix this bug!!!\n", component_name(c)); } } void grid_volume::interpolate(component c, const vec &pc, ivec locs[8], double weights[8]) const { const double SMALL = 1e-13; const vec p = (pc - yee_shift(c))*a; ivec middle(dim); LOOP_OVER_DIRECTIONS(dim,d) middle.set_direction(d, ((int) floor(p.in_direction(d)))*2+1); middle += iyee_shift(c); const vec midv = operator[](middle); const vec dv = (pc - midv)*(2*a); int already_have = 1; for (int i=0;i<8;i++) { locs[i] = round_vec(midv); weights[i] = 1.0; } LOOP_OVER_DIRECTIONS(dim,d) { for (int i=0;i= SMALL * 1e5) abort("large negative interpolation weight[%d] = %e\n", i, weights[i]); weights[i] = 0.0; } else if (weights[i] < SMALL) weights[i] = 0.0; } stupidsort(locs, weights, already_have); // The rest of this code is a crude hack to get the weights right when we // are exactly between a few grid points. i.e. to eliminate roundoff // error. bool all_same = true; for (int i=0;i<8&&weights[i];i++) if (weights[i] != weights[0]) all_same = false; if (all_same) { int num_weights = 0; for (int i=0;i<8&&weights[i];i++) num_weights++; for (int i=0;i<8&&weights[i];i++) weights[i] = 1.0/num_weights; } } volume empty_volume(ndim dim) { volume out(dim); LOOP_OVER_DIRECTIONS(dim,d) { out.set_direction_max(d,0.0); out.set_direction_min(d,0.0); } return out; } volume grid_volume::dV(const ivec &here, double diameter) const { const double hinva = 0.5*inva * diameter; const grid_volume &gv = *this; const vec h = gv[here]; volume out(dim); LOOP_OVER_DIRECTIONS(dim,d) { out.set_direction_max(d,h.in_direction(d)+hinva); out.set_direction_min(d,h.in_direction(d)-hinva); } if (dim == Dcyl && here.r() == 0) { out.set_direction_min(R,0.0); } return out; } volume grid_volume::dV(component c, int ind) const { if (!owns(iloc(c, ind))) return empty_volume(dim); return dV(iloc(c,ind)); } double grid_volume::xmax() const { const double qinva = 0.25*inva; return origin.x() + nx()*inva + qinva; } double grid_volume::xmin() const { const double qinva = 0.25*inva; return origin.x() + qinva; } double grid_volume::ymax() const { const double qinva = 0.25*inva; return origin.y() + ny()*inva + qinva; } double grid_volume::ymin() const { const double qinva = 0.25*inva; return origin.y() + qinva; } double grid_volume::zmax() const { const double qinva = 0.25*inva; return origin.z() + nz()*inva + qinva; } double grid_volume::zmin() const { const double qinva = 0.25*inva; return origin.z() + qinva; } double grid_volume::rmax() const { const double qinva = 0.25*inva; if (dim == Dcyl) return origin.r() + nr()*inva + qinva; abort("No rmax in these dimensions.\n"); return 0.0; // This is never reached. } double grid_volume::rmin() const { const double qinva = 0.25*inva; if (dim == Dcyl) { if (origin.r() == 0.0) { return 0.0; } else { return origin.r() + qinva; } } abort("No rmin in these dimensions.\n"); return 0.0; // This is never reached. } double vec::project_to_boundary(direction d, double boundary_loc) { return fabs(boundary_loc - in_direction(d)); } double grid_volume::boundary_location(boundary_side b, direction d) const { // Returns the location of metallic walls... if (b == High) switch (d) { case X: return loc(Ez,ntot()-1).x(); case Y: return loc(Ez,ntot()-1).y(); case R: return loc(Ep,ntot()-1).r(); case Z: if (dim == Dcyl) return loc(Ep,ntot()-1).z(); else return loc(Ex,ntot()-1).z(); case P: abort("P has no boundary!\n"); case NO_DIRECTION: abort("NO_DIRECTION has no boundary!\n"); } else switch (d) { case X: return loc(Ez,0).x(); case Y: return loc(Ez,0).y(); case R: return loc(Ep,0).r(); case Z: if (dim == Dcyl) return loc(Ep,0).z(); else return loc(Ex,0).z(); case P: abort("P has no boundary!\n"); case NO_DIRECTION: abort("NO_DIRECTION has no boundary!\n"); } return 0.0; } ivec grid_volume::big_corner() const { switch (dim) { case D1: return io + ivec(nz())*2; case D2: return io + ivec(nx(),ny())*2; case D3: return io + ivec(nx(),ny(),nz())*2; case Dcyl: return io + iveccyl(nr(),nz())*2; } return ivec(0); // This is never reached. } vec grid_volume::corner(boundary_side b) const { if (b == Low) return origin; // Low corner vec tmp = origin; LOOP_OVER_DIRECTIONS(dim, d) tmp.set_direction(d, tmp.in_direction(d) + num_direction(d) * inva); return tmp; // High corner } void grid_volume::print() const { LOOP_OVER_DIRECTIONS(dim, d) printf("%s =%5g - %5g (%5g) \t", direction_name(d), origin.in_direction(d), origin.in_direction(d)+num_direction(d)/a, num_direction(d)/a); printf("\n"); } bool grid_volume::intersect_with(const grid_volume &vol_in, grid_volume *intersection, grid_volume *others, int *num_others) const { int temp_num[3] = {0,0,0}; ivec new_io(dim); LOOP_OVER_DIRECTIONS(dim, d) { int minval = max(little_corner().in_direction(d), vol_in.little_corner().in_direction(d)); int maxval = min(big_corner().in_direction(d), vol_in.big_corner().in_direction(d)); if (minval >= maxval) return false; temp_num[d%3] = (maxval - minval)/2; new_io.set_direction(d, minval); } if (intersection != NULL) { *intersection = grid_volume(dim, a, temp_num[0], temp_num[1], temp_num[2]); // fix me : ugly, need new constructor intersection->set_origin(new_io); } if (others != NULL) { int counter = 0; grid_volume vol_containing = *this; LOOP_OVER_DIRECTIONS(dim, d) { if (vol_containing.little_corner().in_direction(d) < vol_in.little_corner().in_direction(d)) { // shave off lower slice from vol_containing and add it to others grid_volume other = vol_containing; const int thick = (vol_in.little_corner().in_direction(d) - vol_containing.little_corner().in_direction(d))/2; other.set_num_direction(d, thick); others[counter] = other; counter++; vol_containing.shift_origin(d, thick*2); vol_containing.set_num_direction(d, vol_containing.num_direction(d) - thick); if (vol_containing.little_corner().in_direction(d) < vol_in.little_corner().in_direction(d)) abort("intersect_with: little corners differ by odd integer?"); } if (vol_containing.big_corner().in_direction(d) > vol_in.big_corner().in_direction(d)) { // shave off upper slice from vol_containing and add it to others grid_volume other = vol_containing; const int thick = (vol_containing.big_corner().in_direction(d) - vol_in.big_corner().in_direction(d))/2; other.set_num_direction(d, thick); other.shift_origin(d, (vol_containing.num_direction(d) - thick)*2); others[counter] = other; counter++; vol_containing.set_num_direction(d, vol_containing.num_direction(d) - thick); if (vol_containing.big_corner().in_direction(d) < vol_in.big_corner().in_direction(d)) abort("intersect_with: big corners differ by odd integer?"); } } *num_others = counter; int initial_points = 1; LOOP_OVER_DIRECTIONS(dim, d) initial_points *= num_direction(d); int final_points , temp = 1; LOOP_OVER_DIRECTIONS(dim, d) temp *= intersection->num_direction(d); final_points = temp; for (int j=0; j<*num_others; j++) { temp = 1; LOOP_OVER_DIRECTIONS(dim, d) temp *= others[j].num_direction(d); final_points += temp; } if (initial_points != final_points) abort("intersect_with: initial_points != final_points, %d, %d\n", initial_points, final_points); } return true; } vec grid_volume::loc_at_resolution(int index, double res) const { vec where = origin; for (int dd=X;dd<=R;dd++) { const direction d = (direction) dd; if (has_boundary(High,d)) { const double dist = boundary_location(High,d)-boundary_location(Low,d); const int nhere = max(1,(int)floor(dist*res+0.5)); where.set_direction(d,origin.in_direction(d) + ((index % nhere)+0.5)*(1.0/res)); index /= nhere; } } return where; } int grid_volume::ntot_at_resolution(double res) const { int mytot = 1; for (int d=X;d<=R;d++) if (has_boundary(High,(direction)d)) { const double dist = boundary_location(High,(direction)d) - boundary_location(Low,(direction)d); mytot *= max(1,(int)(dist*res+0.5)); } return mytot; } vec grid_volume::loc(component c, int ind) const { return operator[](iloc(c,ind)); } ivec grid_volume::iloc(component c, int ind) const { ivec out(dim); LOOP_OVER_DIRECTIONS(dim,d) { int ind_over_stride = ind/stride(d); while (ind_over_stride < 0) ind_over_stride += num_direction(d)+1; out.set_direction(d, 2*(ind_over_stride%(num_direction(d)+1))); } return out + iyee_shift(c) + io; } vec grid_volume::dr() const { switch (dim) { case Dcyl: return veccyl(inva, 0.0); case D1: case D2: case D3: abort("Error in dr\n"); } return vec(0); // This is never reached. } vec grid_volume::dx() const { switch (dim) { case D3: return vec(inva,0,0); case D2: return vec(inva,0); case D1: case Dcyl: abort("Error in dx.\n"); } return vec(0); // This is never reached. } vec grid_volume::dy() const { switch (dim) { case D3: return vec(0,inva,0); case D2: return vec(0,inva); case D1: case Dcyl: abort("Error in dy.\n"); } return vec(0); // This is never reached. } vec grid_volume::dz() const { switch (dim) { case Dcyl: return veccyl(0.0,inva); case D3: return vec(0,0,inva); case D1: return vec(inva); case D2: abort("dz doesn't exist in 2D\n"); } return vec(0); // This is never reached. } grid_volume volone(double zsize, double a) { return grid_volume(D1, a, 0, 0, (int) (zsize*a + 0.5)); } grid_volume voltwo(double xsize, double ysize, double a) { return grid_volume(D2, a, (xsize==0)?1:(int) (xsize*a + 0.5), (ysize==0)?1:(int) (ysize*a + 0.5),0); } grid_volume vol1d(double zsize, double a) { return volone(zsize, a); } grid_volume vol2d(double xsize, double ysize, double a) { return voltwo(xsize, ysize, a); } grid_volume vol3d(double xsize, double ysize, double zsize, double a) { return grid_volume(D3, a,(xsize==0)?1:(int) (xsize*a + 0.5), (ysize==0)?1:(int) (ysize*a + 0.5), (zsize==0)?1:(int) (zsize*a + 0.5)); } grid_volume volcyl(double rsize, double zsize, double a) { if (zsize == 0.0) return grid_volume(Dcyl, a, (int) (rsize*a + 0.5), 0, 1); else return grid_volume(Dcyl, a, (int) (rsize*a + 0.5), 0, (int) (zsize*a + 0.5)); } grid_volume grid_volume::split(int n, int which) const { if (n > nowned_min()) abort("Cannot split %d grid points into %d parts\n", nowned_min(), n); if (n == 1) return *this; // Try to get as close as we can... int biglen = 0; for (int i=0;i<3;i++) if (num[i] > biglen) biglen = num[i]; const int split_point = (int)(biglen*(n/2)/(double)n + 0.5); const int num_low = (int)(split_point*n/(double)biglen + 0.5); if (which < num_low) return split_at_fraction(false, split_point).split(num_low,which); else return split_at_fraction(true, split_point).split(n-num_low,which-num_low); } grid_volume grid_volume::split_by_effort(int n, int which, int Ngv, const grid_volume *v, double *effort) const { const int grid_points_owned = nowned_min(); if (n > grid_points_owned) abort("Cannot split %d grid points into %d parts\n", nowned_min(), n); if (n == 1) return *this; int biglen = 0; direction splitdir = NO_DIRECTION; LOOP_OVER_DIRECTIONS(dim, d) if (num_direction(d) > biglen) { biglen = num_direction(d); splitdir = d; } double best_split_measure = 1e20, left_effort_fraction = 0; int best_split_point = 0; vec corner = zero_vec(dim); LOOP_OVER_DIRECTIONS(dim, d) corner.set_direction(d, origin.in_direction(d) + num_direction(d)/a); for (int split_point = 1; split_point < biglen; split_point+=1) { grid_volume v_left = *this; v_left.set_num_direction(splitdir, split_point); grid_volume v_right = *this; v_right.set_num_direction(splitdir, num_direction(splitdir) - split_point); v_right.shift_origin(splitdir, split_point*2); double total_left_effort = 0, total_right_effort = 0; grid_volume vol; if (Ngv == 0) { total_left_effort = v_left.ntot(); total_right_effort = v_right.ntot(); } else { for (int j = 0; j best_split_point*(grid_points_owned/biglen) || (n-num_low) > (grid_points_owned - best_split_point*(grid_points_owned/biglen))) return split(n, which); if (which < num_low) return split_at_fraction(false, split_point).split_by_effort(num_low,which, Ngv,v,effort); else return split_at_fraction(true, split_point).split_by_effort(n-num_low,which-num_low, Ngv,v,effort); } grid_volume grid_volume::split_at_fraction(bool want_high, int numer) const { int bestd = -1, bestlen = 1; for (int i=0;i<3;i++) if (num[i] > bestlen) { bestd = i; bestlen = num[i]; } if (bestd == -1) { for (int i=0;i<3;i++) master_printf("num[%d] = %d\n", i, num[i]); abort("Crazy weird splitting error.\n"); } grid_volume retval(dim, a, 1,1,1); for (int i=0;i<3;i++) retval.num[i] = num[i]; if (numer >= num[bestd]) abort("Aaack bad bug in split_at_fraction.\n"); direction d = (direction) bestd; if (dim == Dcyl && d == X) d = R; retval.set_origin(io); if (want_high) retval.shift_origin(d,numer*2); if (want_high) retval.num[bestd] -= numer; else retval.num[bestd] = numer; retval.num_changed(); return retval; } // Halve the grid_volume for symmetry exploitation...must contain icenter! grid_volume grid_volume::halve(direction d) const { grid_volume retval(*this); // note that icenter-io is always even by construction of grid_volume::icenter retval.set_num_direction(d, (icenter().in_direction(d) - io.in_direction(d)) / 2); return retval; } grid_volume grid_volume::pad(direction d) const { grid_volume gv(*this); gv.pad_self(d); return gv; } void grid_volume::pad_self(direction d) { num[d%3]+=2; // Pad in both directions by one grid point. num_changed(); shift_origin(d, -2); } ivec grid_volume::icenter() const { /* Find the center of the user's cell. This will be used as the symmetry point, and therefore icenter-io must be *even* in all components in order that rotations preserve the Yee lattice. */ switch (dim) { case D1: return io + ivec(nz()).round_up_to_even(); case D2: return io + ivec(nx(), ny()).round_up_to_even(); case D3: return io + ivec(nx(), ny(), nz()).round_up_to_even(); case Dcyl: return io + iveccyl(0, nz()).round_up_to_even(); } abort("Can't do symmetry with these dimensions.\n"); return ivec(0); // This is never reached. } vec grid_volume::center() const { return operator[](icenter()); } symmetry rotate4(direction axis, const grid_volume &gv) { symmetry s = identity(); if (axis > 2) abort("Can only rotate4 in 2D or 3D.\n"); s.g = 4; FOR_DIRECTIONS(d) { s.S[d].d = d; s.S[d].flipped = false; } s.S[(axis+1)%3].d = (direction)((axis+2)%3); s.S[(axis+1)%3].flipped = true; s.S[(axis+2)%3].d = (direction)((axis+1)%3); s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry rotate2(direction axis, const grid_volume &gv) { symmetry s = identity(); if (axis > 2) abort("Can only rotate2 in 2D or 3D.\n"); s.g = 2; s.S[(axis+1)%3].flipped = true; s.S[(axis+2)%3].flipped = true; s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry mirror(direction axis, const grid_volume &gv) { symmetry s = identity(); s.g = 2; s.S[axis].flipped = true; s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry r_to_minus_r_symmetry(double m) { symmetry s = identity(); s.g = 2; s.S[R].flipped = true; s.S[P].flipped = true; s.symmetry_point = zero_vec(Dcyl); s.i_symmetry_point = zero_ivec(Dcyl); if (m == int(m)) // phase is purely real (+/- 1) when m an integer s.ph = (int(m) & 1) ? -1.0 : 1.0; else s.ph = polar(1.0, m * pi); // general case return s; } symmetry identity() { return symmetry(); } symmetry::symmetry() { g = 1; ph = 1.0; FOR_DIRECTIONS(d) { S[d].d = d; S[d].flipped = false; } next = NULL; } symmetry::symmetry(const symmetry &s) { g = s.g; FOR_DIRECTIONS(d) { S[d].d = s.S[d].d; S[d].flipped = s.S[d].flipped; } ph = s.ph; symmetry_point = s.symmetry_point; i_symmetry_point = s.i_symmetry_point; if (s.next) next = new symmetry(*s.next); else next = NULL; } void symmetry::operator=(const symmetry &s) { g = s.g; FOR_DIRECTIONS(d) { S[d].d = s.S[d].d; S[d].flipped = s.S[d].flipped; } ph = s.ph; symmetry_point = s.symmetry_point; i_symmetry_point = s.i_symmetry_point; if (s.next) next = new symmetry(*s.next); else next = NULL; } bool symmetry::operator==(const symmetry &sym) const { int gtot = multiplicity(); if (gtot != sym.multiplicity()) return false; for (int sn = 1; sn < gtot; ++sn) FOR_DIRECTIONS(d) if (transform(d, sn) != sym.transform(d, sn)) return false; return true; } symmetry::~symmetry() { delete next; } int symmetry::multiplicity() const { if (next) return g*next->multiplicity(); else return g; } symmetry symmetry::operator+(const symmetry &b) const { // The following optimization ignores identity when adding symmetries // together. This is important because identity has an undefined // symmetry point. if (multiplicity() == 1) return b; else if (b.multiplicity() == 1) return *this; symmetry s = *this; symmetry *sn = &s; for (; sn->next; sn = sn->next) ; sn->next = new symmetry(b); return s; } symmetry symmetry::operator*(complex p) const { symmetry s = *this; s.ph *= p; return s; } signed_direction signed_direction::operator*(complex p) { signed_direction sd = *this; sd.phase *= p; return sd; } signed_direction symmetry::transform(direction d, int n) const { // Returns transformed direction + phase/flip; -n indicates inverse transform if (n == 0 || d == NO_DIRECTION) return signed_direction(d); int nme, nrest; if (n < 0) { nme = (g - (-n) % g) % g; nrest = -((-n) / g); } else { nme = n % g; nrest = n / g; } if (nme == 0) { if (nrest == 0) return signed_direction(d); else return next->transform(d,nrest); } else { signed_direction sd; if (nme == 1) sd = S[d]; if (S[d].flipped) sd = flip(transform(S[d].d, nme-1)); else sd = transform(S[d].d, nme-1); if (next && nrest) { if (sd.flipped) return flip(next->transform(sd.d, nrest))*ph; else return next->transform(sd.d, nrest)*ph; } else { return sd*ph; } } } ivec symmetry::transform(const ivec &ov, int n) const { if (n == 0) return ov; ivec out = ov; LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); const int sp_d = i_symmetry_point.in_direction(d); const int sp_sd = i_symmetry_point.in_direction(s.d); const int delta = ov.in_direction(d) - sp_d; if (s.flipped) out.set_direction(s.d, sp_sd - delta); else out.set_direction(s.d, sp_sd + delta); } return out; } ivec symmetry::transform_unshifted(const ivec &ov, int n) const { if (n == 0) return ov; ivec out(ov.dim); LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); if (s.flipped) out.set_direction(s.d, -ov.in_direction(d)); else out.set_direction(s.d, ov.in_direction(d)); } return out; } vec symmetry::transform(const vec &ov, int n) const { if (n == 0) return ov; vec delta = ov; LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); double deltad = ov.in_direction(d) - symmetry_point.in_direction(d); if (s.flipped) delta.set_direction(s.d, -deltad); else delta.set_direction(s.d, deltad); } return symmetry_point + delta; } volume symmetry::transform(const volume &v, int n) const { return volume(transform(v.get_min_corner(),n), transform(v.get_max_corner(),n)); } component symmetry::transform(component c, int n) const { return direction_component(c,transform(component_direction(c),n).d); } derived_component symmetry::transform(derived_component c, int n) const { return direction_component(c,transform(component_direction(c),n).d); } int symmetry::transform(int c, int n) const { return (is_derived(c) ? int(transform(derived_component(c), n)) : int(transform(component(c), n))); } complex symmetry::phase_shift(component c, int n) const { if (c == Dielectric || c == Permeability) return 1.0; complex phase = transform(component_direction(c),n).phase; // flip tells us if we need to flip the sign. For vectors (E), it is // just this simple: bool flip = transform(component_direction(c),n).flipped; if (is_magnetic(c) || is_B(c)) { // Because H is a pseudovector, here we have to figure out if the // transformation changes the handedness of the basis. bool have_one = false, have_two = false; FOR_DIRECTIONS(d) { if (transform(d,n).flipped) flip = !flip; int shift = (transform(d,n).d - d + 6) % 3; if (shift == 1) have_one = true; if (shift == 2) have_two = true; } if (have_one && have_two) flip = !flip; } if (flip) return -phase; else return phase; } complex symmetry::phase_shift(derived_component c, int n) const { if (is_poynting(c)) { signed_direction ds = transform(component_direction(c),n); complex ph = conj(ds.phase) * ds.phase; // E x H gets |phase|^2 return (ds.flipped ? -ph : ph); } else /* energy density */ return 1.0; } complex symmetry::phase_shift(int c, int n) const { return (is_derived(c) ? phase_shift(derived_component(c), n) : phase_shift(component(c), n)); } bool symmetry::is_primitive(const ivec &p) const { // This is only correct if p is somewhere on the yee lattice. if (multiplicity() == 1) return true; for (int i=1;i p.x() && pp.y() <= pp.x()) return false; break; case D3: if (pp.x()+pp.y()+pp.z() < p.x()+p.y()+p.z()) return false; if (pp.x()+pp.y()+pp.z() == p.x()+p.y()+p.z() && pp.x()+pp.y()-pp.z() < p.x()+p.y()-p.z()) return false; if (pp.x()+pp.y()+pp.z() == p.x()+p.y()+p.z() && pp.x()+pp.y()-pp.z() == p.x()+p.y()-p.z() && pp.x()-pp.y()-pp.z() < p.x()-p.y()-p.z()) return false; break; case D1: case Dcyl: if (pp.z() < p.z()) return false; break; } } return true; } /* given a list of geometric volumes, produce a new list with appropriate weights that is minimized according to the symmetry. */ volume_list *symmetry::reduce(const volume_list *gl) const { volume_list *glnew = 0; for (const volume_list *g = gl; g; g = g->next) { int sn; for (sn = 0; sn < multiplicity(); ++sn) { volume gS(transform(g->v, sn)); int cS = transform(g->c, sn); volume_list *gn; for (gn = glnew; gn; gn = gn->next) if (gn->c == cS && gn->v.round_float() == gS.round_float()) break; if (gn) { // found a match gn->weight += g->weight * phase_shift(g->c, sn); break; } } if (sn == multiplicity() && g->weight != 0.0) { // no match, add to glnew volume_list *gn = new volume_list(g->v, g->c, g->weight, glnew); glnew = gn; } } // reduce v's redundant with themselves & delete elements with zero weight: volume_list *gprev = 0, *g = glnew; while (g) { // first, see if g->v is redundant with itself bool halve[5] = {false,false,false,false,false}; complex weight = g->weight; for (int sn = 1; sn < multiplicity(); ++sn) if (g->c == transform(g->c, sn) && g->v.round_float() == transform(g->v, sn).round_float()) { LOOP_OVER_DIRECTIONS(g->v.dim, d) if (transform(d,sn).flipped) { halve[d] = true; break; } g->weight += weight * phase_shift(g->c, sn); } LOOP_OVER_DIRECTIONS(g->v.dim, d) if (halve[d]) g->v.set_direction_max(d, g->v.in_direction_min(d) + 0.5 * g->v.in_direction(d)); // now, delete it if it has zero weight if (g->weight == 0.0) { if (gprev) gprev->next = g->next; else // g == glnew glnew = g->next; g->next = 0; // necessary so that g->next is not deleted recursively delete g; g = gprev ? gprev->next : glnew; } else g = (gprev = g)->next; } return glnew; } /***************************************************************************/ static double poynting_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused (void) data_; // unused return (real(conj(fields[0]) * fields[1]) - real(conj(fields[2])*fields[3])); } static double energy_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused int nfields = *((int *) data_) / 2; double sum = 0; for (int k = 0; k < nfields; ++k) sum += real(conj(fields[2*k]) * fields[2*k+1]); return sum * 0.5; } field_rfunction derived_component_func(derived_component c, const grid_volume &gv, int &nfields, component cs[12]) { switch (c) { case Sx: case Sy: case Sz: case Sr: case Sp: switch (c) { case Sx: cs[0] = Ey; cs[1] = Hz; break; case Sy: cs[0] = Ez; cs[1] = Hx; break; case Sz: cs[0] = Ex; cs[1] = Hy; break; case Sr: cs[0] = Ep; cs[1] = Hz; break; case Sp: cs[0] = Ez; cs[1] = Hr; break; default: break; // never reached } nfields = 4; cs[2] = direction_component(Ex, component_direction(cs[1])); cs[3] = direction_component(Hx, component_direction(cs[0])); return poynting_fun; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: nfields = 0; if (c != H_EnergyDensity) FOR_ELECTRIC_COMPONENTS(c0) if (gv.has_field(c0)) { cs[nfields++] = c0; cs[nfields++] = direction_component(Dx, component_direction(c0)); } if (c != D_EnergyDensity) FOR_MAGNETIC_COMPONENTS(c0) if (gv.has_field(c0)) { cs[nfields++] = c0; cs[nfields++] = direction_component(Bx, component_direction(c0)); } if (nfields > 12) abort("too many field components"); return energy_fun; default: abort("unknown derived_component in derived_component_func"); } return 0; } /***************************************************************************/ } // namespace meep meep-1.3/src/initialize.cpp0000644000175400001440000000762712506540456012703 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" // Cylindrical coordinates: #ifdef HAVE_LIBGSL # include #endif using namespace std; namespace meep { #define J BesselJ double J(int m, double kr) { #if defined(HAVE_LIBGSL) return gsl_sf_bessel_Jn(m, kr); #elif defined(HAVE_JN) return jn(m, kr); // POSIX/BSD jn function #else abort("not compiled with GSL, required for Bessel functions"); return 0; #endif } static double Jprime(int m, double kr) { if (m) return 0.5*(J(m-1,kr)-J(m+1,kr)); else return -J(1,kr); } static double Jroot(int m, int n) { #ifdef HAVE_LIBGSL return gsl_sf_bessel_zero_Jnu(m, n+1); #else abort("not compiled with GSL, required for Bessel functions"); return 0; #endif } static double Jmax(int m, int n) { double rlow, rhigh = Jroot(m,n), rtry; if (n == 0) rlow = 0; else rlow = Jroot(m, n-1); double jplow = Jprime(m,rlow), jptry; do { rtry = rlow + (rhigh - rlow)*0.5; jptry = Jprime(m,rtry); if (jplow*jptry < 0) rhigh = rtry; else rlow = rtry; } while (rhigh - rlow > rhigh*1e-15); return rtry; } static double ktrans, kax; static int m_for_J; static complex JJ(const vec &pt) { return polar(J(m_for_J, ktrans*pt.r()),kax*pt.r()); } static complex JP(const vec &pt) { return polar(Jprime(m_for_J, ktrans*pt.r()),kax*pt.r()); } void fields::initialize_with_nth_te(int np0) { require_component(Hz); for (int i=0;iinitialize_with_nth_te(np0, real(k[Z])); } void fields_chunk::initialize_with_nth_te(int np0, double kz) { const int im = int(m); const int n = (im==0) ? np0 - 0 : np0 - 1; const double rmax = Jmax(im,n); ktrans = rmax*a/gv.nr(); kax = kz*2*pi/a; m_for_J = im; initialize_field(Hz, JJ); } void fields::initialize_with_nth_tm(int np0) { require_component(Ez); require_component(Hp); for (int i=0;iinitialize_with_nth_tm(np0, real(k[Z])); } void fields_chunk::initialize_with_nth_tm(int np1, double kz) { const int im = int(m); const int n = np1 - 1; const double rroot = Jroot(im,n); ktrans = rroot*a/gv.nr(); kax = kz*2*pi/a; m_for_J = im; initialize_field(Ez, JJ); initialize_field(Hp, JP); } void fields::initialize_with_n_te(int ntot) { for (int n=0;n func(const vec &)) { require_component(c); for (int i=0;iinitialize_field(c, func); step_boundaries(type(c)); if (is_D(c)) { update_eh(E_stuff); step_boundaries(E_stuff); } if (is_B(c)) { update_eh(H_stuff); step_boundaries(H_stuff); } } void fields_chunk::initialize_field(component c, complex func(const vec &)) { if (f[c][0]) { LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); complex val = func(here); f[c][0][i] += real(val); if (!is_real) f[c][1][i] += imag(val); } } } } // namespace meep meep-1.3/src/grace.cpp0000644000175400001440000001067312506540456011616 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" using namespace std; namespace meep { /* Below are some routines to output to a grace file. */ const char grace_header[] = "# Grace project file\ #\ @page size 792, 612\ @default symbol size 0.330000\ @g0 on\ @with g0\ "; class grace_point { public: int n; double x, y, dy, extra; grace_point *next; }; grace::grace(const char *fname, const char *dirname) { fn = new char[strlen(fname)+1]; strcpy(fn, fname); dn = new char[strlen(dirname)+1]; strcpy(dn, dirname); char buf[300]; snprintf(buf,300,"%s/%s", dirname, fname); if (!strcmp(fname+strlen(fname)-4,".eps") && !strcmp(dirname,".")) { snprintf(buf,300,"%s", fn); buf[strlen(buf)-4] = 0; fn[strlen(fn)-4] = 0; } f = master_fopen(buf, "w"); if (!f) abort("Unable to open file %s\n", buf); set_num = -1; sn = -1; pts = NULL; master_fprintf(f,"%s", grace_header); } grace::~grace() { flush_pts(); master_fclose(f); char gracecmd[500]; snprintf(gracecmd, 500, "gracebat -hdevice EPS -printfile %s/%s.eps -hardcopy %s/%s", dn, fn, dn, fn); if (my_rank() == 0) system(gracecmd); delete[] dn; delete[] fn; all_wait(); } void grace::new_set(grace_type pt) { flush_pts(); set_num++; sn++; if (!am_master()) return; fprintf(f, "@ s%d line color %d\n", sn, set_num+1); fprintf(f, "@ s%d symbol color %d\n", sn, set_num+1); fprintf(f, "@ s%d errorbar color %d\n", sn, set_num+1); fprintf(f, "@ target G0.S%d\n", sn); if (pt == ERROR_BARS) fprintf(f, "@ type xydy\n"); else fprintf(f, "@ type xy\n"); } void grace::set_range(double xmin, double xmax, double ymin, double ymax) { if (!am_master()) return; fprintf(f, "@ version 1\n"); // Stupid nasty hack to make grace recognize the range. fprintf(f, "@ world xmin %g\n", xmin); fprintf(f, "@ world xmax %g\n", xmax); fprintf(f, "@ world ymin %g\n", ymin); fprintf(f, "@ world ymax %g\n", ymax); fprintf(f, "@ view xmin 0.15\n"); fprintf(f, "@ view xmax 0.95\n"); fprintf(f, "@ view ymin 0.15\n"); fprintf(f, "@ view ymax 0.85\n"); } void grace::set_legend(const char *l) { if (!am_master()) return; fprintf(f, "@ s%d legend \"%s\"\n", sn, l); } void grace::new_curve() { if (set_num == -1) new_set(); else sn++; if (!am_master()) return; fprintf(f, "@ s%d line color %d\n", sn, set_num+1); fprintf(f, "@ s%d symbol color %d\n", sn, set_num+1); fprintf(f, "@ s%d errorbar color %d\n", sn, set_num+1); fprintf(f, "\n"); } void grace::output_point(double x, double y, double dy, double extra) { if (!am_master()) return; if (dy >= 0 && extra != -1) { fprintf(f, "%g\t%g\t%g\t%g\n", x, y, dy, extra); } else if (dy >= 0) { fprintf(f, "%g\t%g\t%g\n", x, y, dy); } else { fprintf(f, "%g\t%g\n", x, y); } } void grace::output_out_of_order(int n, double x, double y, double dy, double extra) { if (set_num == -1) new_set(); grace_point *gp = new grace_point; gp->n = n; gp->x = x; gp->y = y; gp->dy = dy; gp->extra = extra; gp->next = pts; pts = gp; } void grace::flush_pts() { int first_time = 1; while (pts) { grace_point *p = pts; int num_seen = 0; while (p) { if (p->n <= 0) num_seen++; p = p->next; } if (num_seen && !first_time) new_curve(); first_time = 0; p = pts; grace_point **last = &pts; while (p) { if (p->n <= 0) { *last = p->next; output_point(p->x,p->y,p->dy,p->extra); delete p; p = *last; } else { p->n -= 1; last = &p->next; p = p->next; } } } } } // namespace meep meep-1.3/src/update_pols.cpp0000644000175400001440000000357612506540456013060 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" using namespace std; namespace meep { void fields::update_pols(field_type ft) { for (int i=0;iis_mine()) if (chunks[i]->update_pols(ft)) chunk_connections_valid = false; /* synchronize to avoid deadlocks if one process decides it needs to allocate E or H ... */ chunk_connections_valid = and_to_all(chunk_connections_valid); } bool fields_chunk::update_pols(field_type ft) { bool allocated_fields = false; realnum *w[NUM_FIELD_COMPONENTS][2]; FOR_COMPONENTS(c) DOCMP2 w[c][cmp] = f_w[c][cmp] ? f_w[c][cmp] : f[c][cmp]; for (polarization_state *p = pol[ft]; p; p = p->next) { // Lazily allocate internal polarization data: if (!p->data) { p->data = p->s->new_internal_data(f, gv); if (p->data) { p->s->init_internal_data(f, dt, gv, p->data); allocated_fields = true; } } // Finally, timestep the polarizations: p->s->update_P(w, f_w_prev, dt, gv, p->data); } return allocated_fields; } } // namespace meep meep-1.3/src/bands.cpp0000644000175400001440000004363512506540456011630 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #ifdef HAVE_HARMINV # include #endif using namespace std; namespace meep { #define BAND(b,r,t) ((b)[(r)+(t)*nr]) bandsdata::bandsdata() { verbosity = 0; maxbands = -1; tstart = 0; for (int i=0;ilast_time_max()); for (int i=0;iis_mine()) last_time = max(last_time,chunks[i]->last_source_time()); return max_to_all(last_time); } double fields_chunk::last_source_time() { return 0; } void fields::prepare_for_bands(const vec &p, double endtime, double fmax, double qmin, double frac_pow_min) { int last_source = (int)(last_source_time()/dt+0.5); last_source = max(last_source, t + phasein_time); if (!bands) bands = new bandsdata; bands->tstart = last_source+1; if (bands->tstart < t) bands->tstart = t; bands->tend = t + (int)(endtime/dt) - 1; { int ind[8]; double w[8]; int indind = 0; while (bands->index[indind] != -1 && indind < num_bandpts) indind++; for (int h=0;hgv.contains(p)) { chunks[h]->gv.interpolate(chunks[h]->gv.eps_component(), p, ind, w); for (int i=0;i<8&&w[i]&&indindchunk[indind] = chunks[h]; bands->index[indind++] = ind[i]; } break; } } bands->fpmin = frac_pow_min; // Set fmin properly... const double epsmax = max_eps(); double cutoff_freq = 0.0; if (gv.dim == Dcyl) { cutoff_freq = 1.84*a*dt/(2*pi)/gv.nr()/sqrt(epsmax); if (m == 0) cutoff_freq *= 0.5; } bands->fmin = sqrt(cutoff_freq*cutoff_freq + abs(k[Z])*abs(k[Z])*(a*dt)*(a*dt)/epsmax); // FIXME bands->fmin = cutoff_freq/dt; bands->qmin = qmin; // Set fmax and determine how many timesteps to skip over... bands->fmax = fmax; { // for when there are too many data points... double decayconst = bands->fmax*dt/qmin*8.0; double smalltime = 1./(decayconst + bands->fmax*dt); bands->scale_factor = (int)(0.06*smalltime); if (bands->scale_factor < 1) bands->scale_factor = 1; if (verbosity) master_printf("scale_factor is %d (%g,%g)\n", bands->scale_factor, bands->fmax*dt, decayconst); } if (bands->tend <= bands->tstart) { printf("Oi, we don't have any time to take a fourier transform!\n"); abort("FT start is %d and end is %d\n", bands->tstart, bands->tend); } bands->ntime = (1+(bands->tend-bands->tstart)/bands->scale_factor); bands->dt = dt * bands->scale_factor; for (int c=0;c<10;c++) for (int i=0;if[i][c]; bands->f[i][c] = new complex[bands->ntime]; if (bands->f[i][c] == NULL) abort("Unable to allocate bandstructure array!\n"); for (int j=0;jntime;j++) bands->f[i][c][j] = 0.0; } bands->P = new complex[bands->ntime]; for (int i=0;intime;i++) bands->P[i] = 0.0; bands->verbosity = verbosity; for (int h=0;hbands = bands; } void fields::record_bands() { if (!bands) return; if (t > bands->tend || t < bands->tstart) return; if (t % bands->scale_factor != 0) return; for (int i=0;irecord_bands(t); } void fields_chunk::record_bands(int tcount) { int thet = (tcount-bands->tstart)/bands->scale_factor; if (thet >= bands->ntime) return; for (int p=0; pindex[p]!=-1; p++) if (this == bands->chunk[p]) for (int c=0;c<10;c++) if (gv.has_field((component)c)) { complex tmp; if (f[c][0] && f[c][1]) tmp = complex(f[c][0][bands->index[p]], f[c][1][bands->index[p]]); bands->f[p][c][thet] = broadcast(n_proc(), tmp); } } #define HARMOUT(o,n,f) ((o)[(n)+(f)*maxbands]) complex fields::get_band(int nn, int maxbands) { //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands); complex thef = fad[nn-1]; delete[] fad; return thef; } void fields::grace_bands(grace *g, int maxbands) { double *approx_power = new double[maxbands]; //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands, approx_power); int num_found = 0; for (int i=0;ioutput_out_of_order(i, abs(k[Z]), fabs(real(fad[i])), fabs(imag(fad[i])), approx_power[i]); // FIXME } delete[] fad; delete[] approx_power; } void fields::output_bands(FILE *o, const char *name, int maxbands) { out_bands(o, name, maxbands); } void fields::out_bands(FILE *o, const char *name, int maxbands) { double *approx_power = new double[maxbands]; //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands, approx_power); complex *eigen = new complex[maxbands*6]; if (!eigen) abort("Error allocating...\n"); for (int whichf = 0; whichf < 6; whichf++) { for (int n=0;n f[hi+1]-f[hi]) return 1; else return 0; } static inline int am_done(double f[], int fmax, int lo, int hi) { double wid = f[hi]-f[lo] + 0.001; int lodone = lo == 0 || f[lo]-f[lo-1] > wid; int hidone = hi == fmax-1 || f[hi+1]-f[hi] > wid; return lodone && hidone; } static void get_cluster(double f[], int fmax, int maxsize, double maxwid, int *out_lo, int *out_hi) { int lo = get_closest(f,fmax); int hi = lo+1; int minsize = maxsize/2+1; if (minsize < 3) minsize = 3; for (int i=0;i maxwid) break; hi++; } else { if (f[hi]-f[lo-1] > maxwid) break; lo--; } } *out_lo = lo; *out_hi = hi; } int fields::cluster_some_bands_cleverly(double *tf, double *td, complex *ta, int num_freqs, int fields_considered, int maxbands, complex *fad, double *approx_power) { const double total_time = (bands->tend-bands->tstart)*dt; const double deltaf = 1.0/total_time; int freqs_so_far = num_freqs; if (!quiet) master_printf("About to sort by frequency... (%d frequencies)\n", freqs_so_far); // Sort by frequency... for (int i = 1; i < freqs_so_far; i++) { for (int j=i; j>0;j--) { if (tf[j] temp = ta[j]; ta[j] = ta[j-1]; ta[j-1] = temp; } } } if (!quiet) master_printf("Looking for clusters...\n"); int num_found = 0; double totwid = 0.001; while (freqs_so_far >= fields_considered/2 + 1) { int hi, lo; get_cluster(tf,freqs_so_far,fields_considered,deltaf,&lo,&hi); int mid = lo + (hi-lo)/2; if (tf[hi]-tf[lo] < deltaf) { if (!quiet) master_printf("Got a cluster from %g to %g (%d freqs)\n", tf[lo], tf[hi], 1+hi-lo); fad[num_found] = complex(tf[mid],td[mid]); if (approx_power) { approx_power[num_found] = 0; for (int i=lo;i<=hi;i++) { if (abs(ta[i])*abs(ta[i]) > approx_power[num_found]) { approx_power[num_found] = abs(ta[i])*abs(ta[i]); } } } totwid += tf[hi]-tf[lo]; num_found++; if (num_found >= maxbands) num_found--; } else { if (!quiet) master_printf("Rejected a cluster from %g to %g (%d/%d freqs)\n", tf[lo], tf[hi], 1+hi-lo, fields_considered); if (verbosity > 1) master_printf("width is %g vs %g\n", tf[hi] - tf[lo], deltaf); lo = get_closest(tf,freqs_so_far); hi = lo+1; if (verbosity > 1) master_printf("dropping %g and %g\n", tf[hi], tf[lo]); } freqs_so_far -= 1 + hi - lo; for (int i=lo;i 1) master_printf("Have a leftover freq: %g\n", tf[i]); } return num_found; } complex *fields::clever_cluster_bands(int maxbands, double *approx_power) { bands->maxbands = maxbands; const int max_harminvs = 120; const int max_freqs = max_harminvs*maxbands; double *tf = new double[max_freqs]; double *td = new double[max_freqs]; complex *ta = new complex[max_freqs]; const int ntime = bands->ntime; if (!ta) abort("Error allocating...\n"); int num_found = 0; complex *fad = new complex[maxbands]; for (int i=0;iindex[p]!=-1; p++) for (int whichf = 0; whichf < 10; whichf++) if (gv.has_field((component)whichf) && maxbands < max_freqs - freqs_so_far) { if (verbosity>1) master_printf("Looking at field %d\n", whichf); int freqs_here = bands->get_freqs(bands->f[p][whichf], ntime, ta+freqs_so_far, tf+freqs_so_far, td+freqs_so_far); if (freqs_here) { fields_considered++; freqs_so_far += freqs_here; } if (freqs_so_far + maxbands > max_freqs) break; } if (k == 0 && gv.dim == Dcyl && m != 0) fields_considered /= 2; num_found = cluster_some_bands_cleverly(tf, td, ta, freqs_so_far, fields_considered, maxbands, fad, approx_power); delete[] ta; delete[] tf; delete[] td; // Get rid of bands with too little power in them... { double maxp = 0.0; for (int i=0;ifpmin; for (int i=0;i0;j--) { if (real(fad[j]) t1 = fad[j]; fad[j] = fad[j-1]; fad[j-1] = t1; double temp = approx_power[j]; approx_power[j] = approx_power[j-1]; approx_power[j-1] = temp; } } } return fad; } /* backwards compatibility with harminv < 1.4 */ #if HARMINV_VERSION_MAJOR < 1 || (HARMINV_VERSION_MAJOR == 1 && HARMINV_VERSION_MINOR < 4) # define harminv_get_amplitude(pa, d, k) *(pa) = harminv_get_amplitude(d, k) # define harminv_get_omega(pw, d, k) *(pw) = harminv_get_omega(d, k) #endif int bandsdata::get_freqs(complex *data, int n, complex *amps, double *freq_re, double *freq_im) { const double total_time = n*dt; const double qminhere = 1.0/(1.0/qmin + 0.25/(fmin*total_time)); return do_harminv(data, n, dt, fmin, fmax, maxbands, amps, freq_re, freq_im, NULL, 1.1, qminhere); } int do_harminv(complex *data, int n, double dt, double fmin, double fmax, int maxbands, complex *amps, double *freq_re, double *freq_im, double *errors, double spectral_density, double Q_thresh, double rel_err_thresh, double err_thresh, double rel_amp_thresh, double amp_thresh) { #ifndef HAVE_HARMINV abort("compiled without Harminv library, required for do_harminv"); return 0; #else int numfreqs = int(fabs(fmax-fmin)*dt*n*spectral_density); // c.f. harminv if (numfreqs > 150) numfreqs = 150; // prevent matrices from getting too big if (numfreqs < 2) numfreqs = 2; if (maxbands > numfreqs) numfreqs = maxbands; // check for all zeros in input // data is a size n array. { int i; for (i = 0; i < n && data[i] == 0.0; i++) ; if (i == n) return 0; } #if 0 // debugging: save data file and arguments for standalone harminv program { FILE *f = fopen("harminv.dat", "w"); fprintf(f, "# -f %d -t %g %g-%g -Q %e -e %e -E %e -a %e -A %e -F\n", numfreqs, dt, fmin, fmax, Q_thresh, rel_err_thresh, err_thresh, rel_amp_thresh, amp_thresh); for (int i = 0; i < n; ++i) fprintf(f, "%g%+gi\n", real(data[i]), imag(data[i])); fclose(f); } #endif harminv_data hd = harminv_data_create(n, data, fmin*dt, fmax*dt, numfreqs); harminv_solve(hd); int nf = harminv_get_num_freqs(hd); if (nf == 0) return 0; int *fsort = new int[nf]; // indices of frequencies, sorted as needed for (int i = 0; i < nf; ++i) fsort[i] = i; for (int i = 0; i < nf; ++i) // sort in increasing order of error for (int j = i + 1; j < nf; ++j) if (harminv_get_freq_error(hd, fsort[i]) > harminv_get_freq_error(hd, fsort[j])) { int k = fsort[i]; fsort[i] = fsort[j]; fsort[j] = k; } double min_err = harminv_get_freq_error(hd, fsort[0]); complex aa; harminv_get_amplitude(&aa, hd, 0); double max_amp = abs(aa); for (int i = 1; i < nf; ++i) { harminv_get_amplitude(&aa, hd, i); double amp = abs(aa); if (max_amp < amp) max_amp = amp; } { // eliminate modes that fall outside the various thresholds: int j = 0; for (int i = 0; i < nf; ++i) { double f = abs(harminv_get_freq(hd, fsort[i]) / dt); double err = harminv_get_freq_error(hd, fsort[i]); harminv_get_amplitude(&aa, hd, fsort[i]); double amp = abs(aa); if (f >= fmin && f <= fmax && abs(harminv_get_Q(hd, fsort[i])) > Q_thresh && err < err_thresh && err < rel_err_thresh * min_err && amp > amp_thresh && amp > rel_amp_thresh * max_amp) { fsort[j++] = fsort[i]; } } nf = j; } { // eliminate positive/negative frequency pairs // set indices to -1 for frequencies to be eliminated for (int i = 0; i < nf; ++i) if (fsort[i] != -1) { // i hasn't been eliminated yet double f = harminv_get_freq(hd, fsort[i]); if (f < 0.0) { double kdiff = -2 * f; int kpos = i; for (int k = 0; k < nf; ++k) // search for closest positive freq. if (fsort[k] != -1) { // k hasn't been eliminated yet double fdiff = abs(harminv_get_freq(hd, fsort[k]) + f); if (fdiff < kdiff) { kpos = k; kdiff = fdiff; } } if (kpos != i && kdiff < 2.0 / n) { // consider them the same // pick the one with the smaller error if (harminv_get_freq_error(hd, fsort[i]) < harminv_get_freq_error(hd, fsort[kpos])) fsort[kpos] = -1; else fsort[i] = -1; } } } int j = 0; for (int i = 0; i < nf; ++i) // remove the eliminated indices if (fsort[i] != -1) fsort[j++] = fsort[i]; nf = j; } if (nf > maxbands) nf = maxbands; // sort again, this time in increasing order of freq: for (int i = 0; i < nf; ++i) // simple O(nf^2) sort for (int j = i + 1; j < nf; ++j) if (abs(harminv_get_freq(hd, fsort[i])) > abs(harminv_get_freq(hd, fsort[j]))) { int k = fsort[i]; fsort[i] = fsort[j]; fsort[j] = k; } for (int i = 0; i < nf; ++i) { complex freq; harminv_get_omega(&freq, hd, fsort[i]); freq /= (2*pi*dt); freq_re[i] = abs(real(freq)); freq_im[i] = imag(freq); harminv_get_amplitude(&(amps[i]), hd, fsort[i]); if (errors) errors[i] = harminv_get_freq_error(hd, fsort[i]); } delete[] fsort; harminv_data_destroy(hd); return nf; #endif } } // namespace meep meep-1.3/src/monitor.cpp0000644000175400001440000003242612506540456012224 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #if defined(HAVE_LIBFFTW3) # include #elif defined(HAVE_LIBDFFTW) # include #elif defined(HAVE_LIBFFTW) # include #endif #define HAVE_SOME_FFTW (defined(HAVE_LIBFFTW3) || defined(HAVE_LIBFFTW) || defined(HAVE_LIBDFFTW)) /* Below are the monitor point routines. */ using namespace std; namespace meep { monitor_point::monitor_point() { next = NULL; } monitor_point::~monitor_point() { if (next) delete next; } inline complex getcm(const realnum * const f[2], int i) { return complex(f[0][i],f[1][i]); } static void dumbsort(complex val[8]) { for (int i=0;i<7;i++) { int lowest = i; for (int j=i+1;j<8;j++) if (abs(val[j]) < abs(val[lowest])) lowest = j; complex tmp = val[i]; val[i] = val[lowest]; val[lowest] = tmp; } } static void dumbsort(double val[8]) { for (int i=0;i<7;i++) { int lowest = i; for (int j=i+1;j<8;j++) if (abs(val[j]) < abs(val[lowest])) lowest = j; double tmp = val[i]; val[i] = val[lowest]; val[lowest] = tmp; } } void fields::get_point(monitor_point *pt, const vec &loc) const { if (pt == NULL) abort("Error: get_point passed a null pointer!\n"); for (int i=0;i<10;i++) pt->f[i] = 0.0; pt->loc = loc; pt->t = time(); FOR_COMPONENTS(c) if (gv.has_field(c)) pt->f[c] = get_field(c,loc); } complex fields::get_field(int c, const vec &loc) const { return (is_derived(c) ? get_field(derived_component(c), loc) : get_field(component(c), loc)); } double fields::get_field(derived_component c, const vec &loc) const { component c1 = Ex, c2 = Ex; double sum = 0; switch (c) { case Sx: case Sy: case Sz: case Sr: case Sp: switch (c) { case Sx: c1 = Ey; c2 = Hz; break; case Sy: c1 = Ez; c2 = Hx; break; case Sz: c1 = Ex; c2 = Hy; break; case Sr: c1 = Ep; c2 = Hz; break; case Sp: c1 = Ez; c2 = Hr; break; default: break; // never } sum += real(conj(get_field(c1, loc)) * get_field(c2, loc)); sum -= real(conj(get_field(direction_component(Ex, component_direction(c2)), loc)) * get_field(direction_component(Hx, component_direction(c1)), loc)); return sum; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: if (c != H_EnergyDensity) FOR_ELECTRIC_COMPONENTS(c1) if (gv.has_field(c1)) { c2 = direction_component(Dx, component_direction(c1)); sum += real(conj(get_field(c1, loc)) * get_field(c2, loc)); } if (c != D_EnergyDensity) FOR_MAGNETIC_COMPONENTS(c1) if (gv.has_field(c1)) { complex f = get_field(c1, loc); sum += real(conj(f) * f); } return sum * 0.5; default: abort("unknown derived_component in get_field"); } } complex fields::get_field(component c, const vec &loc) const { switch (c) { case Dielectric: return get_eps(loc); case Permeability: return get_mu(loc); default: ivec ilocs[8]; double w[8]; complex val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_field(c,ilocs[argh]); dumbsort(val); complex res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } } complex fields::get_field(component c, const ivec &origloc) const { ivec iloc = origloc; complex kphase = 1.0; locate_point_in_user_volume(&iloc, &kphase); for (int sn=0;sngv.contains(S.transform(iloc,sn))) return S.phase_shift(c,sn)*kphase* chunks[i]->get_field(S.transform(c,sn),S.transform(iloc,sn)); return 0.0; } complex fields_chunk::get_field(component c, const ivec &iloc) const { complex res = 0.0; if (f[c][0] && f[c][1]) res = getcm(f[c], gv.index(c, iloc)); else if (f[c][0]) res = f[c][0][gv.index(c,iloc)]; return broadcast(n_proc(), res); } /* Bounding box for zero-communication get_field, below. This is the largest box in which you can interpolate the fields without communication. It is *not* necessarily non-overlapping with other chunks. */ volume fields_chunk::get_field_gv(component c) const { switch (c) { case Dielectric: case Permeability: c = gv.eps_component(); default: return volume(gv.loc(c, 0), gv.loc(c, gv.ntot() - 1)); } } /* Non-collective, zero-communication get_field... loc *must* be in get_field_gv(c). */ complex fields_chunk::get_field(component c, const vec &loc) const { ivec ilocs[8]; double w[8]; switch (c) { case Permeability: abort("non-collective get_field(mu) unimplemented"); case Dielectric: abort("non-collective get_field(eps) unimplemented"); default: { gv.interpolate(c, loc, ilocs, w); complex res = 0.0; for (int i = 0; i < 8 && w[i] != 0.0; ++i) { if (!gv.contains(ilocs[i])) abort("invalid loc in chunk get_field, weight = %g", w[i]); if (f[c][0] && f[c][1]) res += getcm(f[c], gv.index(c, ilocs[i])) * w[i]; else if (f[c][0]) res += f[c][0][gv.index(c,ilocs[i])] * w[i]; } return res; } } } double fields::get_chi1inv(component c, direction d, const ivec &origloc) const { ivec iloc = origloc; complex aaack = 1.0; locate_point_in_user_volume(&iloc, &aaack); for (int sn=0;sngv.contains(S.transform(iloc,sn))) { signed_direction ds = S.transform(d,sn); return chunks[i]->get_chi1inv(S.transform(c,sn), ds.d, S.transform(iloc,sn)) * (ds.flipped ^ S.transform(component_direction(c),sn).flipped ? -1 : 1); } return 0.0; } double fields_chunk::get_chi1inv(component c, direction d, const ivec &iloc) const { double res = 0.0; if (is_mine()) res = s->chi1inv[c][d] ? s->chi1inv[c][d][gv.index(c, iloc)] : (d == component_direction(c) ? 1.0 : 0); return broadcast(n_proc(), res); } double fields::get_chi1inv(component c, direction d, const vec &loc) const { ivec ilocs[8]; double w[8]; double val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_chi1inv(c,d,ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double fields::get_eps(const vec &loc) const { double tr = 0; int nc = 0; FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double fields::get_mu(const vec &loc) const { double tr = 0; int nc = 0; FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double structure::get_chi1inv(component c, direction d, const ivec &origloc) const { ivec iloc = origloc; for (int sn=0;sngv.contains(S.transform(iloc,sn))) { signed_direction ds = S.transform(d,sn); return chunks[i]->get_chi1inv(S.transform(c,sn), ds.d, S.transform(iloc,sn)) * (ds.flipped ^ S.transform(component_direction(c),sn).flipped ? -1 : 1); } return 0.0; } double structure_chunk::get_chi1inv(component c, direction d, const ivec &iloc) const { double res = 0.0; if (is_mine()) res = chi1inv[c][d] ? chi1inv[c][d][gv.index(c, iloc)] : (d == component_direction(c) ? 1.0 : 0); return broadcast(n_proc(), res); } double structure::get_chi1inv(component c, direction d, const vec &loc) const { ivec ilocs[8]; double w[8]; double val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_chi1inv(c,d,ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double structure::get_eps(const vec &loc) const { double tr = 0; int nc = 0; FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double structure::get_mu(const vec &loc) const { double tr = 0; int nc = 0; FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } monitor_point *fields::get_new_point(const vec &loc, monitor_point *the_list) const { monitor_point *p = new monitor_point(); get_point(p, loc); p->next = the_list; return p; } complex monitor_point::get_component(component w) { return f[w]; } double monitor_point::poynting_in_direction(direction d) { direction d1 = cycle_direction(loc.dim, d, 1); direction d2 = cycle_direction(loc.dim, d, 2); // below Ex and Hx are used just to say that we want electric or magnetic component complex E1 = get_component(direction_component(Ex, d1)); complex E2 = get_component(direction_component(Ex, d2)); complex H1 = get_component(direction_component(Hx, d1)); complex H2 = get_component(direction_component(Hx, d2)); return (real(E1)*real(H2) - real(E2)*real(H1)) + (imag(E1)*imag(H2) - imag(E2)*imag(H1)); } double monitor_point::poynting_in_direction(vec dir) { if (dir.dim != loc.dim) abort("poynting_in_direction: dir.dim != loc.dim\n"); dir = dir / abs(dir); double result = 0.0; LOOP_OVER_DIRECTIONS(dir.dim, d) result += dir.in_direction(d) * poynting_in_direction(d); return result; } void monitor_point::fourier_transform(component w, complex **a, complex **f, int *numout, double fmin, double fmax, int maxbands) { int n = 1; monitor_point *p = next; double tmax = t, tmin = t; while (p) { n++; if (p->t > tmax) tmax = p->t; if (p->t < tmin) tmin = p->t; p = p->next; } p = this; complex *d = new complex[n]; for (int i=0;inext) { d[i] = p->get_component(w); } if (fmin > 0.0) { // Get rid of any static fields_chunk! complex mean = 0.0; for (int i=0;i 0.0 || fmax > 0.0) && maxbands > 0) { #else if ((fmin <= 0.0 && fmax <= 0.0) || maxbands <= 0) { maxbands = n; fmin = 0; fmax = (n-1)*(1.0/(tmax-tmin)); } #endif *a = new complex[maxbands]; *f = new complex[maxbands]; *numout = maxbands; delete[] d; for (int i = 0;it; (*a)[i] += p->get_component(w)*complex(cos(inside),sin(inside)); p = p->next; } (*a)[i] /= (tmax-tmin); } #if HAVE_SOME_FFTW } else { *numout = n; *a = new complex[n]; *f = d; fftw_complex *in = (fftw_complex *) d, *out = (fftw_complex *) *a; fftw_plan p; #ifdef HAVE_LIBFFTW3 p = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE); fftw_execute(p); fftw_destroy_plan(p); #else p = fftw_create_plan(n, FFTW_FORWARD, FFTW_ESTIMATE); fftw_one(p, in, out); fftw_destroy_plan(p); #endif for (int i=0;i 0.5*n/(tmax-tmin)) (*f)[i] -= n/(tmax-tmin); (*a)[i] *= (tmax-tmin)/n; } } #endif } void monitor_point::harminv(component w, complex **a, complex **f, int *numout, double fmin, double fmax, int maxbands) { int n = 1; monitor_point *p = next; double tmax = t, tmin = t; while (p) { n++; if (p->t > tmax) tmax = p->t; if (p->t < tmin) tmin = p->t; p = p->next; } p = this; complex *d = new complex[n]; for (int i=0;inext) { d[i] = p->get_component(w); } *a = new complex[n]; double *f_re = new double[n]; double *f_im = new double[n]; *numout = do_harminv(d, n, (tmax-tmin)/(n-1), fmin, fmax, maxbands, *a, f_re, f_im, NULL); *f = new complex[*numout]; for (int i=0;i<*numout;i++) (*f)[i] = complex(f_re[i],f_im[i]); delete[] f_re; delete[] f_im; delete[] d; } } // namespace meep meep-1.3/src/anisotropic_averaging.cpp0000644000175400001440000002521612504026600015075 00000000000000#include #include "meep_internals.hpp" /* This file contains routines to compute the "average" or "effective" dielectric constant for a pixel, using an anisotropic averaging procedure described in an upcoming paper (similar to the one in MPB). */ using namespace std; namespace meep { //////////////////////////////////////////////////////////////////////////// #include "sphere-quad.h" static vec sphere_pt(const vec ¢, double R, int n, double &weight) { switch (cent.dim) { case D1: { weight = sphere_quad[0][n][3]; vec pt(sphere_quad[0][n][2]); return cent + pt * R; } case D2: { weight = sphere_quad[1][n][3]; vec pt(sphere_quad[1][n][0], sphere_quad[1][n][1]); return cent + pt * R; } case D3: { weight = sphere_quad[2][n][3]; vec pt(sphere_quad[2][n][0], sphere_quad[2][n][1], sphere_quad[2][n][2]); return cent + pt * R; } case Dcyl: { weight = sphere_quad[1][n][3]; return cent + veccyl(sphere_quad[1][n][0], sphere_quad[1][n][1]) * R; } default: abort("unknown dimensions in sphere_pt\n"); } } //////////////////////////////////////////////////////////////////////////// vec material_function::normal_vector(field_type ft, const volume &v) { vec gradient(zero_vec(v.dim)); vec p(v.center()); double R = v.diameter(); for (int i = 0; i < num_sphere_quad[number_of_directions(v.dim)-1]; ++i) { double weight; vec pt = sphere_pt(p, R, i, weight); gradient += (pt - p) * (weight * chi1p1(ft,pt)); } return gradient; } /* default: simple numerical integration of surfaces/cubes, relative tolerance 'tol'. This is superseded by the routines in the libctl interface, which either use a semi-analytical average or can use a proper adaptive cubature. */ void material_function::eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol, int maxeval) { field_type ft = type(c); if (!maxeval) { trivial: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0.0; chi1inv_row[component_direction(c) % 3] = 1/chi1p1(ft,v.center()); return; } vec gradient(normal_vector(ft, v)); if (abs(gradient) < 1e-8) goto trivial; double meps=1, minveps=1; vec d = v.get_max_corner() - v.get_min_corner(); int ms = 10; double old_meps=0, old_minveps=0; int iter = 0; switch(v.dim) { case D3: while ((fabs(meps - old_meps) > tol*fabs(old_meps)) && (fabs(minveps - old_minveps) > tol*fabs(old_minveps))) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int k=0; k < ms; k++) for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.x()/ms, j*d.y()/ms, k*d.z()/ms)); if (ep < 0) goto trivial; meps += ep; minveps += 1/ep; } meps /= ms*ms*ms; minveps /= ms*ms*ms; ms *= 2; if (maxeval && (iter += ms*ms*ms) >= maxeval) goto done; } break; case D2: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.x()/ms, j*d.y()/ms)); if (ep < 0) goto trivial; meps += ep; minveps += 1/ep; } meps /= ms*ms; minveps /= ms*ms; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; case Dcyl: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; double sumvol = 0; for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double r = v.get_min_corner().r() + i*d.r()/ms; double ep = chi1p1(ft,v.get_min_corner() + veccyl(i*d.r()/ms, j*d.z()/ms)); if (ep < 0) goto trivial; sumvol += r; meps += ep * r; minveps += r/ep; } meps /= sumvol; minveps /= sumvol; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; case D1: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.z()/ms)); if (ep < 0) { meps = chi1p1(ft,v.center()); minveps = 1/meps; goto done; } meps += ep; minveps += 1/ep; } meps /= ms; minveps /= ms; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; } done: { double n[3] = {0,0,0}; double nabsinv = 1.0/abs(gradient); LOOP_OVER_DIRECTIONS(gradient.dim, k) n[k%3] = gradient.in_direction(k) * nabsinv; /* get rownum'th row of effective tensor P * minveps + (I-P) * 1/meps = P * (minveps-1/meps) + I * 1/meps where I is the identity and P is the projection matrix P_{ij} = n[i] * n[j]. */ int rownum = component_direction(c) % 3; for (int i=0; i<3; ++i) chi1inv_row[i] = n[rownum] * n[i] * (minveps - 1/meps); chi1inv_row[rownum] += 1/meps; } } void structure_chunk::set_chi1inv(component c, material_function &medium, bool use_anisotropic_averaging, double tol, int maxeval) { if (!is_mine() || !gv.has_field(c)) return; field_type ft = type(c); if (ft != E_stuff && ft != H_stuff) abort("only E or H can have chi"); medium.set_volume(gv.pad().surroundings()); if (!use_anisotropic_averaging) maxeval = 0; const double smoothing_diameter = 1.0; // FIXME: make user-changable? // may take a long time in 3d, so prepare to print status messages int npixels = 0, ipixel = 0; int loop_npixels = 0; LOOP_OVER_VOL(gv, c, i) { loop_npixels = loop_n1 * loop_n2 * loop_n3; goto breakout; // hack to use loop-size computation from LOOP_OVER_VOL } breakout: npixels += loop_npixels; double last_output_time = wall_time(); FOR_FT_COMPONENTS(ft,c2) if (gv.has_field(c2)) { direction d = component_direction(c2); if (!chi1inv[c][d]) chi1inv[c][d] = new realnum[gv.ntot()]; if (!chi1inv[c][d]) abort("Memory allocation error.\n"); } direction dc = component_direction(c); direction d0 = X, d1 = Y, d2 = Z; if (gv.dim == Dcyl) { d0 = R; d1 = P; } int idiag = component_index(c); bool trivial[3] = {true,true,true}; double trivial_val[3] = {0,0,0}; trivial_val[idiag] = 1.0; ivec shift1(unit_ivec(gv.dim,component_direction(c)) * (ft == E_stuff ? 1 : -1)); LOOP_OVER_VOL(gv, c, i) { double chi1invrow[3], chi1invrow_offdiag[3]; IVEC_LOOP_ILOC(gv, here); medium.eff_chi1inv_row(c, chi1invrow, gv.dV(here,smoothing_diameter), tol,maxeval); medium.eff_chi1inv_row(c, chi1invrow_offdiag, gv.dV(here-shift1,smoothing_diameter), tol,maxeval); if (chi1inv[c][d0]) { chi1inv[c][d0][i] = (d0 == dc) ? chi1invrow[0] : chi1invrow_offdiag[0]; trivial[0] = trivial[0] && (chi1inv[c][d0][i] == trivial_val[0]); } if (chi1inv[c][d1]) { chi1inv[c][d1][i] = (d1 == dc) ? chi1invrow[1] : chi1invrow_offdiag[1]; trivial[1] = trivial[1] && (chi1inv[c][d1][i] == trivial_val[1]); } if (chi1inv[c][d2]) { chi1inv[c][d2][i] = (d2 == dc) ? chi1invrow[2] : chi1invrow_offdiag[2]; trivial[2] = trivial[2] && (chi1inv[c][d2][i] == trivial_val[2]); } if (!quiet && (ipixel+1) % 1000 == 0 && wall_time() > last_output_time + MIN_OUTPUT_TIME) { master_printf("subpixel-averaging is %g%% done, %g s remaining\n", ipixel * 100.0 / npixels, (npixels - ipixel) * (wall_time() - last_output_time) / ipixel); last_output_time = wall_time(); } ++ipixel; } direction ds[3]; ds[0] = d0; ds[1] = d1; ds[2] = d2; for (int i = 0; i < 3; ++i) { trivial_chi1inv[c][ds[i]] = trivial[i]; if (i != idiag && trivial[i]) { // deallocate trivial offdiag delete[] chi1inv[c][ds[i]]; chi1inv[c][ds[i]] = 0; } } // only deallocate trivial diag if entire tensor is trivial if (trivial[0] && trivial[1] && trivial[2]) { delete[] chi1inv[c][dc]; chi1inv[c][dc] = 0; } medium.unset_volume(); } void structure_chunk::add_susceptibility(material_function &sigma, field_type ft, const susceptibility &sus) { if (ft != E_stuff && ft != H_stuff) abort("susceptibilities must be for E or H fields"); sigma.set_volume(gv.pad().surroundings()); susceptibility *newsus = sus.clone(); newsus->next = NULL; newsus->ntot = gv.ntot(); // get rid of previously allocated sigma, normally not the case here: FOR_COMPONENTS(c) FOR_DIRECTIONS(d) if (newsus->sigma[c][d]) { delete[] newsus->sigma[c][d]; newsus->sigma[c][d] = NULL; newsus->trivial_sigma[c][d] = true; } // if we own this chunk, set up the sigma array(s): if (is_mine()) FOR_FT_COMPONENTS(ft,c) if (gv.has_field(c)) { FOR_FT_COMPONENTS(ft,c2) if (gv.has_field(c2)) { direction d = component_direction(c2); if (!newsus->sigma[c][d]) newsus->sigma[c][d] = new realnum[gv.ntot()]; if (!newsus->sigma[c][d]) abort("Memory allocation error.\n"); } bool trivial[3] = {true, true, true}; direction dc = component_direction(c); direction d0 = X, d1 = Y, d2 = Z; if (gv.dim == Dcyl) { d0 = R; d1 = P; } int idiag = component_index(c); realnum *s0 = newsus->sigma[c][d0]; realnum *s1 = newsus->sigma[c][d1]; realnum *s2 = newsus->sigma[c][d2]; vec shift1(gv[unit_ivec(gv.dim,component_direction(c)) * (ft == E_stuff ? 1 : -1)]); LOOP_OVER_VOL(gv, c, i) { double sigrow[3], sigrow_offdiag[3]; IVEC_LOOP_LOC(gv, here); sigma.sigma_row(c, sigrow, here); sigma.sigma_row(c, sigrow_offdiag, here - shift1); sigrow[(idiag+1) % 3] = sigrow_offdiag[(idiag+1) % 3]; sigrow[(idiag+2) % 3] = sigrow_offdiag[(idiag+2) % 3]; if (s0 && (s0[i] = sigrow[0]) != 0.) trivial[0] = false; if (s1 && (s1[i] = sigrow[1]) != 0.) trivial[1] = false; if (s2 && (s2[i] = sigrow[2]) != 0.) trivial[2] = false; } direction ds[3]; ds[0] = d0; ds[1] = d1; ds[2] = d2; for (int i = 0; i < 3; ++i) { newsus->trivial_sigma[c][ds[i]] = trivial[i]; if (i != idiag && trivial[i]) { // deallocate trivial offdiag delete[] newsus->sigma[c][ds[i]]; newsus->sigma[c][ds[i]] = 0; } } // only deallocate trivial diag if entire tensor is trivial if (trivial[0] && trivial[1] && trivial[2]) { delete[] newsus->sigma[c][dc]; newsus->sigma[c][dc] = 0; } } // finally, add to the beginning of the chiP list: newsus->next = chiP[ft]; chiP[ft] = newsus; sigma.unset_volume(); } } // namespace meep meep-1.3/src/near2far.cpp0000644000175400001440000003437712506540456012244 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Near-to-far field transformation: compute DFT of tangential fields on a "near" surface, and use these (via the equivalence principle) to compute the fields on a "far" surface via the homogeneous-medium Green's function in 2d or 3d. */ #include #include #include "config.h" using namespace std; namespace meep { dft_near2far::dft_near2far(dft_chunk *F_, double fmin, double fmax, int Nf, double eps_, double mu_) { if (Nf <= 1) fmin = fmax = (fmin + fmax) * 0.5; freq_min = fmin; Nfreq = Nf; dfreq = Nf <= 1 ? 0.0 : (fmax - fmin) / (Nf - 1); F = F_; eps = eps_; mu = mu_; } dft_near2far::dft_near2far(const dft_near2far &f) { freq_min = f.freq_min; Nfreq = f.Nfreq; dfreq = f.dfreq; F = f.F; eps = f.eps; mu = f.mu; } void dft_near2far::remove() { while (F) { dft_chunk *nxt = F->next_in_dft; delete F; F = nxt; } } void dft_near2far::operator-=(const dft_near2far &st) { if (F && st.F) *F -= *st.F; } void dft_near2far::save_hdf5(h5file *file, const char *dprefix) { save_dft_hdf5(F, "F", file, dprefix); } void dft_near2far::load_hdf5(h5file *file, const char *dprefix) { load_dft_hdf5(F, "F", file, dprefix); } void dft_near2far::save_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::WRITE, prefix); save_hdf5(ff, dprefix); delete ff; } void dft_near2far::load_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::READONLY, prefix); load_hdf5(ff, dprefix); delete ff; } void dft_near2far::scale_dfts(complex scale) { if (F) F->scale_dft(scale); } typedef void (*greenfunc)(std::complex *EH, const vec &x, double freq, double eps, double mu, const vec &x0, component c0, std::complex); /* Given the field f0 correponding to current-source component c0 at x0, compute the E/H fields EH[6] (6 components) at x for a frequency freq in the homogeneous 3d medium eps and mu. Adapted from code by M. T. Homer Reid in his SCUFF-EM package (file scuff-em/src/libs/libIncField/PointSource.cc), which is GPL v2+. */ void green3d(std::complex *EH, const vec &x, double freq, double eps, double mu, const vec &x0, component c0, std::complex f0) { vec rhat = x - x0; double r = abs(rhat); rhat = rhat / r; if (rhat.dim != D3) abort("wrong dimensionality in green3d"); double n = sqrt(eps*mu); double k = 2*pi*freq*n; std::complex ikr = std::complex(0.0, k*r); double ikr2 = -(k*r)*(k*r); /* note that SCUFF-EM computes the fields from the dipole moment p, whereas we need it from the current J = -i*omega*p, so our result is divided by -i*omega compared to SCUFF */ std::complex expfac = f0 * polar(k*n/(4*pi*r), k*r + pi*0.5); double Z = sqrt(mu/eps); vec p = zero_vec(rhat.dim); p.set_direction(component_direction(c0), 1); double pdotrhat = p & rhat; vec rhatcrossp = vec(rhat.y() * p.z() - rhat.z() * p.y(), rhat.z() * p.x() - rhat.x() * p.z(), rhat.x() * p.y() - rhat.y() * p.x()); /* compute the various scalar quantities in the point source formulae */ std::complex term1 = 1.0 - 1.0/ikr + 1.0/ikr2; std::complex term2 = (-1.0 + 3.0/ikr - 3.0/ikr2) * pdotrhat; std::complex term3 = (1.0 - 1.0/ikr); /* now assemble everything based on source type */ if (is_electric(c0)) { expfac /= eps; EH[0] = expfac * (term1*p.x() + term2*rhat.x()); EH[1] = expfac * (term1*p.y() + term2*rhat.y()); EH[2] = expfac * (term1*p.z() + term2*rhat.z()); EH[3] = expfac*term3*rhatcrossp.x() / Z; EH[4] = expfac*term3*rhatcrossp.y() / Z; EH[5] = expfac*term3*rhatcrossp.z() / Z; } else if (is_magnetic(c0)) { expfac /= mu; EH[0] = -expfac*term3*rhatcrossp.x() * Z; EH[1] = -expfac*term3*rhatcrossp.y() * Z; EH[2] = -expfac*term3*rhatcrossp.z() * Z; EH[3] = expfac * (term1*p.x() + term2*rhat.x()); EH[4] = expfac * (term1*p.y() + term2*rhat.y()); EH[5] = expfac * (term1*p.z() + term2*rhat.z()); } else abort("unrecognized source type"); } #ifdef HAVE_LIBGSL # include // hankel function J + iY static std::complex hankel(int n, double x) { return std::complex(gsl_sf_bessel_Jn(n, x), gsl_sf_bessel_Yn(n, x)); } #else /* !HAVE_LIBGSL */ static std::complex hankel(int n, double x) { (void) n; (void) x; // unused abort("GNU GSL library is required for Hankel functions"); } #endif /* !HAVE_LIBGSL */ /* like green3d, but 2d Green's functions */ void green2d(std::complex *EH, const vec &x, double freq, double eps, double mu, const vec &x0, component c0, std::complex f0) { vec rhat = x - x0; double r = abs(rhat); rhat = rhat / r; if (rhat.dim != D2) abort("wrong dimensionality in green2d"); double omega = 2*pi*freq; double k = omega*sqrt(eps*mu); std::complex ik = std::complex(0.0, k); double kr = k*r; double Z = sqrt(mu/eps); std::complex H0 = hankel(0, kr) * f0; std::complex H1 = hankel(1, kr) * f0; std::complex ikH1 = 0.25 * ik * H1; if (component_direction(c0) == meep::Z) { if (is_electric(c0)) { // Ez source EH[0] = EH[1] = 0.0; EH[2] = (-0.25*omega*mu) * H0; EH[3] = -rhat.y() * ikH1; EH[4] = rhat.x() * ikH1; EH[5] = 0.0; } else /* (is_magnetic(c0)) */ { // Hz source EH[0] = rhat.y() * ikH1; EH[1] = -rhat.x() * ikH1; EH[2] = 0.0; EH[3] = EH[4] = 0.0; EH[5] = (-0.25*omega*eps) * H0; } } else { /* in-plane source */ std::complex H2 = hankel(2, kr) * f0; vec p = zero_vec(rhat.dim); p.set_direction(component_direction(c0), 1); double pdotrhat = p & rhat; double rhatcrossp = rhat.x() * p.y() - rhat.y() * p.x(); if (is_electric(c0)) { // Exy source EH[0] = -(rhat.x() * (pdotrhat/r * 0.25*Z)) * H1 + (rhat.y() * (rhatcrossp * omega*mu * 0.125)) * (H0 - H2); EH[1] = -(rhat.y() * (pdotrhat/r * 0.25*Z)) * H1 - (rhat.x() * (rhatcrossp * omega*mu * 0.125)) * (H0 - H2); EH[2] = 0.0; EH[3] = EH[4] = 0.0; EH[5] = -rhatcrossp * ikH1; } else /* (is_magnetic(c0)) */ { // Hxy source EH[0] = EH[1] = 0.0; EH[2] = rhatcrossp * ikH1; EH[3] = -(rhat.x() * (pdotrhat/r * 0.25/Z)) * H1 + (rhat.y() * (rhatcrossp * omega*eps * 0.125)) * (H0 - H2); EH[4] = -(rhat.y() * (pdotrhat/r * 0.25/Z)) * H1 - (rhat.x() * (rhatcrossp * omega*eps * 0.125)) * (H0 - H2); EH[5] = 0.0; } } } void dft_near2far::farfield_lowlevel(std::complex *EH, const vec &x) { if (x.dim != D3 && x.dim != D2) abort("only 2d or 3d far-field computation is supported"); greenfunc green = x.dim == D2 ? green2d : green3d; std::complex EH6[6]; for (int i = 0; i < 6 * Nfreq; ++i) EH[i] = 0.0; for (dft_chunk *f = F; f; f = f->next_in_dft) { assert(Nfreq == f->Nomega); component c0 = component(f->vc); /* equivalent source component */ vec rshift(f->shift * (0.5*f->fc->gv.inva)); int idx_dft = 0; LOOP_OVER_IVECS(f->fc->gv, f->is, f->ie, idx) { IVEC_LOOP_LOC(f->fc->gv, x0); x0 = f->S.transform(x0, f->sn) + rshift; for (int i = 0; i < Nfreq; ++i) { double freq = freq_min + i*dfreq; green(EH6, x, freq, eps, mu, x0, c0, f->dft[Nfreq*idx_dft+i]); for (int j = 0; j < 6; ++j) EH[i*6 + j] += EH6[j]; } idx_dft++; } } } std::complex *dft_near2far::farfield(const vec &x) { std::complex *EH, *EH_local; EH_local = new std::complex[6 * Nfreq]; farfield_lowlevel(EH_local, x); EH = new std::complex[6 * Nfreq]; sum_to_all(EH_local, EH, 6 * Nfreq); delete[] EH_local; return EH; } void dft_near2far::save_farfields(const char *fname, const char *prefix, const volume &where, double resolution) { /* compute output grid size etc. */ int dims[4] = {1,1,1,1}; double dx[3] = {0,0,0}; direction dirs[3] = {X,Y,Z}; int rank = 0, N = 1; LOOP_OVER_DIRECTIONS(where.dim, d) { dims[rank] = int(floor(where.in_direction(d) * resolution)); if (dims[rank] <= 1) { dims[rank] = 1; dx[rank] = 0; } else dx[rank] = where.in_direction(d) / (dims[rank] - 1); N *= dims[rank]; dirs[rank++] = d; } if (N * Nfreq < 1) return; /* nothing to output */ /* 6 x 2 x N x Nfreq array of fields in row-major order */ realnum *EH = new realnum[6*2*N*Nfreq]; realnum *EH_ = new realnum[6*2*N*Nfreq]; // temp array for sum_to_master /* fields for farfield_lowlevel for a single output point x */ std::complex *EH1 = new std::complex[6*Nfreq]; vec x(where.dim); for (int i0 = 0; i0 < dims[0]; ++i0) { x.set_direction(dirs[0], where.in_direction_min(dirs[0]) + i0*dx[0]); for (int i1 = 0; i1 < dims[1]; ++i1) { x.set_direction(dirs[1], where.in_direction_min(dirs[1]) + i1*dx[1]); for (int i2 = 0; i2 < dims[2]; ++i2) { x.set_direction(dirs[2], where.in_direction_min(dirs[2]) + i2*dx[2]); farfield_lowlevel(EH1, x); int idx = (i0 * dims[1] + i1) * dims[2] + i2; for (int i = 0; i < Nfreq; ++i) for (int k = 0; k < 6; ++k) { EH_[((k * 2 + 0) * N + idx) * Nfreq + i] = real(EH1[i * 6 + k]); EH_[((k * 2 + 1) * N + idx) * Nfreq + i] = imag(EH1[i * 6 + k]); } } } } delete[] EH1; sum_to_master(EH_, EH, 6*2*N*Nfreq); delete[] EH_; /* collapse trailing singleton dimensions */ while (rank > 0 && dims[rank-1] == 1) --rank; /* frequencies are the last dimension */ if (Nfreq > 1) dims[++rank] = Nfreq; /* output to a file with one dataset per component & real/imag part */ if (am_master()) { const int buflen = 1024; static char filename[buflen]; snprintf(filename, buflen, "%s%s%s.h5", prefix ? prefix : "", prefix && prefix[0] ? "-" : "", fname); h5file ff(filename, h5file::WRITE, false); component c[6] = {Ex,Ey,Ez,Hx,Hy,Hz}; char dataname[128]; for (int k = 0; k < 6; ++k) for (int reim = 0; reim < 2; ++reim) { snprintf(dataname, 128, "%s.%c", component_name(c[k]), "ri"[reim]); ff.write(dataname, rank, dims, EH + (k*2 + reim)*N*Nfreq); } } delete[] EH; } static double approxeq(double a, double b) { return fabs(a - b) < 0.5e-11 * (fabs(a) + fabs(b)); } dft_near2far fields::add_dft_near2far(const volume_list *where, double freq_min, double freq_max, int Nfreq){ dft_chunk *F = 0; /* E and H chunks*/ double eps = 0, mu = 0; for (const volume_list *w = where; w; w = w->next) { direction nd = component_direction(w->c); if (nd == NO_DIRECTION) nd = normal_direction(w->v); if (nd == NO_DIRECTION) abort("unknown dft_near2far normal"); direction fd[2]; double weps = get_eps(w->v.center()); double wmu = get_mu(w->v.center()); if (w != where && !(approxeq(eps, weps) && approxeq(mu, wmu))) abort("dft_near2far requires surfaces in a homogeneous medium"); eps = weps; mu = wmu; /* two transverse directions to normal (in cyclic order to get correct sign s below) */ switch (nd) { case X: fd[0] = Y; fd[1] = Z; break; case Y: fd[0] = Z; fd[1] = X; break; case R: fd[0] = P; fd[1] = Z; break; case P: fd[0] = Z; fd[1] = R; break; case Z: if (gv.dim == Dcyl) fd[0] = R, fd[1] = P; else fd[0] = X, fd[1] = Y; break; default: abort("invalid normal direction in dft_near2far!"); } for (int i = 0; i < 2; ++i) { /* E or H */ for (int j = 0; j < 2; ++j) { /* first or second component */ component c = direction_component(i == 0 ? Ex : Hx, fd[j]); /* find equivalent source component c0 and sign s */ component c0 = direction_component(i == 0 ? Hx : Ex, fd[1-j]); double s = j == 0 ? 1 : -1; /* sign of n x c */ if (is_electric(c)) s = -s; F = add_dft(c, w->v, freq_min, freq_max, Nfreq, true, s*w->weight, F, false, 1.0, false, c0); } } } return dft_near2far(F, freq_min, freq_max, Nfreq, eps, mu); } } // namespace meep meep-1.3/depcomp0000755000175400001440000005601612235234727010620 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-1.3/TODO0000644000175400001440000000320412315364346007722 00000000000000Near-field to far-field transformations. Gyromagnetic materials (via general anisotropic conductivities). Finish implementation of active materials (multilevel atoms and saturable absorption/gain). Support 3d (r,phi,z) cell, where m is "Bloch wavenumber" -- gives 6-fold (and n-fold) symmetry as side effect -- allows computation of bended photonic-crystal waveguides Implement transparent boundary conditions to back PML layers, so that glancing-angle waves can be absorbed. Re-entrant functions: foo(vec&) arguments should be foo(vec&, void*) where the second argument can be used to pass state (instead of global vars). User proper PML for cylindrical coordinates, rather than quasi-PML. Use more-stable algorithm for dispersive media. Field dump/load (i.e. restarting)? Make sure epsilon and other material properties respect symmetry, periodic boundaries, etc.? Remove monitor point class (redundant with HDF5 output, DFT volumes?). Integrated support for calling MPB mode solver for current distributions. rename fields::initialize to fields::add_to_fields or something like that, and allow specifying a geometric_volume. Dump field Fourier transforms in a readable, documented format. Support Pade approximates (libpadespectrum) for Fourier and modal analysis. Check sensitivity to rounding error and if there is a better way to handle: structure.cpp:555 (PML region boundaries) vec.cpp:560 (interpolation weights) anisotropic_averaging: 79 (magnitude of normal vector) ------------------- LIBCTL FRONT-END: Need a way to reset epsilon when restarting, and also phasing support. Support arbitrary-shaped sources. meep-1.3/NEWS0000644000175400001440000003300112506537557007737 00000000000000Meep 1.3 (31 March 2015) * New near-to-far-field functionality: given a bounding surface, automatically computes the Fourier-transformed field in any desired grid of "far-field" points arbitrarily far away. * Compatibility with Harminv 1.4 (fixes issue #13: ppc64 portability). * Fix compilation with latest C++ standard (e.g. on OS X 10.9). * Bug fix in CW solver convergence test; thanks to @FilipDominec for the bug report. * Build fix for Fedora 21 (thanks to Dean Brettle) (issue #14). Meep 1.2.1 (2 April 2014) * Added new absorber type, as an alternative to PML, which simply provides a scalar conductivity gradient for cases where PML fails. * Fixed bug which sometimes prevented dispersive materials from being used in PML regions. * Some fixes to BLAS/LAPACK linking. * Bug fixes in LDOS computation. * Work around gcc bug #54498, which caused a spurious PML test failure with gcc 4.7 and 4.7.1; thanks to Brahmanand Jogai and Thorsten Alteholz for the bug reports. Meep 1.2 (20 July 2012) * Fixed to work with Guile version 2.x (older versions still work); requires libctl 3.2 or later. * Added epsilon-input-file feature to read a scalar dielectric function from an HDF5 file (similar to MPB). * Support for anisotropic dispersive materials (tensor sigma parameter). * Support for Drude dispersion model. New syntax is 'make drude-susceptibility', 'make lorentzian-susceptibility', etc. (old 'make polarizability' is still supported for backwards compatibility). * Support for "thermal" dispersive materials which include noise term in the polarization. * Added dft-ldos feature for efficient LDOS-spectrum computation. * Documented stress-tensor (force) spectrum computation feature. * Added "mean-stretch" property of PML (defaults to 1), to support real coordinate stretching for damping evanescent modes. * Support for eigenmode-source feature using upcoming MPB release. * Various small bugfixes. Meep 1.1.2 (31 August 2009) * Added "make check" test (in 2D_convergence) for new special-kz? feature (for computing out-of-plane modes in 2d more efficiently). * Fix typo preventing Casimir calculations from running for periodic problems. Meep 1.1.1 (24 August 2009) * Fixed release bug preventing Casimir calculation from running. Meep 1.1 (20 August 2009) * Meep's PML is now a true PML for arbitrary anisotropic, dispersive, and conducting media. (Now uses a slightly unconventional reformulation of PML described at ab-initio.mit.edu/meep/pml-meep.pdf) * Fixed bug which caused anisotropic non-diagonal mu to be unstable. * Fix compilation failure with gcc 4.4 due to missing cstdio header (thanks to Linran Fan and Bin Shao for the bug reports). * C++ interface: volume was renamed to grid_volume and geometric_volume was renamed to volume, to better reflect their respective roles. * Added accurate-fields-near-cylorigin? option to have more accurate fields near the r=0 origin for large m in cylindrical coordinates, at the expense of requiring a smaller Courant factor. (Default is false, corresponding to behavior in older Meep versions.) * In 2d computational cells, added much more efficient support for exp(ikz) z-dependence, enabled by new special-kz? input variable (default is false since it only works in 2d and is a little subtle for real fields). * Includes preliminary new features to aid in computation of optical forces (both classical and quantum Casimir forces); further documentation pending more testing. * Removed obsolete doc directory (all documentation is on the website these days). * Small performance improvements in Lorentzian dispersion handling. * Fix configure script failure when cross-compiling. * Fix compilation failure with MPICH. Meep 1.0.3 (5 June 2009) * Allow GUILE_CONFIG environment variable to override location of guile-config program in configure script; this is useful when cross-compiling. Meep 1.0.2 (2 June 2009) * Correct superficial 'make check' failure on 32-bit x86 machines with gcc 4.3.x, due to slight impact on floating-point rounding by automatic SSE/SSE2 vectorization; thanks to Silviu Popescu for the bug report. * Correct superficial 'make check' failure when compiling under icc. Meep 1.0.1 (28 May 2009) * Enable correct operation and passed test suite when MEEP_SINGLE (single-precision) mode is enabled in meep.hpp; thanks to Seyoon Kim for the bug reports. * Use new automake features to have less-verbose build output by default (you can build in verbose mode by 'make V=1'), and running all test programs then reporting which ones failed instead of stopping at the first failure. * Fix superficial failure in 2D_convergence test under gcc 3.4.6; thanks to Alex Prengel for the bug report. * Fix failure in flux test under gcc 4.3.1 in some cases; thanks to Alex Prengel for the bug report. * Fix compilation problem with gcc 4.4, correcting Debian bug #505002. Meep 1.0 (28 April 2009) * New timestepping scheme for off-diagonal anisotropic epsilon and mu, based on technique by Werner and Cary [ J. Comp. Phys. 226, 1085 (2007) ], that improves FDTD stability when anisotropy is present (such as when subpixel averaging is used on isotropic media). * Scheme user interface now supports user-specified anisotropic (real-symmetric) epsilon and mu (via epsilon-diag, epsilon-offdiag, mu-diag, and mu-offdiag parameters, similar to MPB). Accurate subpixel averaging of anisotropic media based on the method by Kottke, Farjadpour, & Johnson [ Phys. Rev. E. 77, 036611 (2008) ]. * Anisotropic dispersive materials are now supported, although currently the dispersive part of the epsilon/mu tensor must be diagonal, via the new sigma-diag parameter of polarizability. (The corresponding C++ interface has also removed delta_epsilon.) * The delta-epsilon parameter of polarizability has been removed; you should use sigma instead. * New fields::integrate2 function (and corresponding Scheme function integrate2-field-function) to perform integrations involving two simulations with the same computational cell (e.g. field-overlap calculations for coupled-mode theory). * In the Scheme interface, subpixel averaging is not used for user-specified material-function types; you only get subpixel averaging for the standard shapes (blocks, cylinders, etcetera). * Haskell code-generation is no longer used, and hsrc directory is removed. Bitrotted and undocumented (hence unused) saturable-absorber feature has been removed, along with energy-saturation parameter of polarizability. * Some bug-fixes to test programs that made them overly sensitive to roundoff errors and possibly fail depending on the compiler. (New fields::round_time and meep-round-time functions to round times to single-precision, useful for robust time comparisons.) Meep 0.20.4 (17 March 2009) * Bug fix in cylindrical code, which caused it to blow up in some circumstances for nonzero m. * Bug fix: non-integrated sources with conductivity are now second-order accurate, thanks to Alejandro Rodriguez. * Bug fix in writing strings with parallel HDF5, thanks to Zheng Li for the bug report. * Check that PML parameters are sensible (e.g. that total PML thickness is no greater than cell thickness) to avoid common mistakes. * New extra-materials input variable, so that you no longer have to use "dummy objects" to specify the existence of some materials when using material-function types. Meep 0.20.3 (24 July 2008) * Fixed circular dependency in Makefile, which caused problems with some versions of make; thanks to Kaoru Narita for the bug report. Meep 0.20.2 (21 July 2008) * Fixed incompatibility with Guile 1.6.x or earlier; thanks to the bug report by Andreas Unger. Meep 0.20.1 (20 July 2008) * Improved handling of nested synchronized-magnetic calls. * Bug fix: parallel builds (make -j) should now work. * Bug fix: pkg-config file was incorrectly installed for MPI version; thanks to Majid Sodagar for the bug report. Meep 0.20 (19 July 2008) * Support for user-specified permeability (mu). Renamed "dielectric" to "medium" in libctl interface, new "mu" property and new output-bfield and output-mu functions, and new "Permeability" and "Bx" etc. field types. * Support for user-specified electric and/or magnetic conductivities. These are especially useful to add a desired dissipation loss (an imaginary part of epsilon/mu) in a narrow bandwidth, without messing around with Lorentzian dispersive materials. * Add predefined perfect-magnetic-conductor (mu = -infinity) material, along with perfect-electric-conductor (eps = -infinity). * Added synchronized-magnetic step function to allow step functions to run with the electric and magnetic fields synchronized in time to second-order accuracy. * New PML implementation (UPML instead of split-field), should have lower reflection in many cases. * User-specified PML profile and asymptotic reflection. * Internally, all timestepping code is now handwritten (and much shorter) rather than old verbose Haskell-generated code; this should make it easier to add new features. * Add support for non-integrated current sources, if the is-integrated? property of the current is set to false; this is now the default, to make handling of E and H sources more similar and intuitive. * Work with HDF5 1.8 (which previously would not compile unless you manually set a preprocessor flag, due to API changes). * Check for ctl.h in /usr/include/ctl/ctl.h (default in Fedora), and check for libctl in /usr/share/libctl3 (default in Debian & Ubuntu). * Bug fix: fixed relative phase of E and H sources (which were off from one another by half a timestep); thanks to M. Megens for bug report. * Bug fix: make sure h5 filenames have unique timestep for cases where dt is very small or very large. Meep 0.10.1 (13 Nov. 2007) * Bug fix in flux_in_box, which accidentally returned the flux multiplied by the number of processors, instead of the flux. * Bug fix in epsilon averaging for structures including metals (epsilon < 0), fixing an instability. * Bug fix in output-png when running in parallel (removing race condition). * Fixed bug that disabled subpixel averaging for dimensions=1 (thanks to Mischa Megens for the bug report). * Fixed bug that caused output-tot-pwr to stop Meep with an error message; thanks to Vyacheslav Sokolov for the bug report. * Make "at-every" step functions less susceptible to rounding errors; thanks to L. Le Guyader for the bug report. * Fixed bug in dispersive media that wasted memory on parallel machines (the polarization memory was not parallelized); thanks to J. L. Silva for the bug report. * Bug fix in output-png+h5, thanks to a report by Chad Husko. * Fixed several deadlocks that could occur when the parallel Meep is used with a serial HDF5 library (we continue to recommend using the parallel HDF5 library with parallel Meep, however). Thanks in part to Lingling Tang for his bug report. * For maintainer-mode, improved detection of Haskell package names; thanks to Liang Huo for the bug report. Meep 0.10 (21 Aug. 2006) * eps-averaging? is now turned on by default (in libctl interface), using much-improved algorithm by Ardavan Farjadpour. This greatly improves accuracy, and also allows continuous tuning of geometric parameters. (See our upcoming paper in Optics Lett., with a preprint linked on the web site.) New input variables subpixel-tol and subpixel-maxeval to control the accuracy of the subpixel averaging. * Support for chi2 (Pockels) as well as chi3 (Kerr) nonlinearities. * Symmetries no longer require the cell size to be an even number of pixels. Previously, Meep exited with an error in this case, whereas now it simply adds an extra pixel to the cell size as needed. * New with-prefix step function to allow you to use a different filename-prefix for selected outputs. * New feature for output-png: built-in shell variable $EPS that refers to the last-output epsilon .h5 file, which you can use to easily add dielectric contours/overlays to the field output image. * Added output-png+h5 function that outputs both .png and .h5 files. * New functions flux-in-box, electric-energy-in-box, magnetic-energy-in-box, and field-energy-in-box (convenience wrappers around C++ functions). * Bug fix in Kerr nonlinearity - chi3 was accidentally scaled by epsilon^4 factor. * Bug fix: if you specified three or more symmetries, at most two symmetries were used (ignoring the rest). * Bug fix in rotate2 symmetry, which wasn't working correctly. * Bug fix in add-flux for multiple flux regions, thanks to K. Choi. * Bug fix in harminv where it wouldn't allow you to call harminv more than once for the same run loop; thanks to Aristos Karalis. * Bug fix in save-flux/load-flux that prevented it from working properly without output directories, thanks to Karl Koch. * Fixed abort that sometimes occurred due to rounding when the source was the same width as the cell (thanks to G. J. Parker). * Fixed minor build problems on Cygwin, SGI, and other systems, thanks to Christopher Kang, Robyn Landers, Florencio Garcia, and others. Meep 0.9 (1 Apr. 2006) * Initial public release. meep-1.3/COPYING0000644000175400001440000004325411352247755010302 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. meep-1.3/configure0000755000175400001440000325107712506540652011157 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for meep 1.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: meep@ab-initio.mit.edu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='meep' PACKAGE_TARNAME='meep' PACKAGE_VERSION='1.3' PACKAGE_STRING='meep 1.3' PACKAGE_BUGREPORT='meep@ab-initio.mit.edu' PACKAGE_URL='' ac_unique_file="src/step.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS MEEP_SUFFIX LIBCTL_LIBS CTL_H_CPPFLAG GEN_CTL_IO LIBCTL_DIR ACTIVATE_READLINE GUILE_CONFIG WITH_LIBCTL_FALSE WITH_LIBCTL_TRUE MEEPLIBS RUNCODE MPIRUN HARMINV_LIBS HARMINV_CFLAGS PKG_CONFIG LAPACK_LIBS BLAS_LIBS FLIBS ac_ct_F77 FFLAGS F77 LATEX2HTML CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL ARCHFLAG PRTDIAG am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build MPILIBS MPICXX am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX SHARED_VERSION_INFO MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_shared enable_dependency_tracking with_mpi enable_portable_binary with_gcc_arch enable_debug enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_blas with_lapack with_hdf5 with_libctl ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC MPICXX CC CFLAGS CPP CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures meep 1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/meep] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of meep 1.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=no] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-portable-binary disable compiler optimizations that would produce unportable binaries --enable-debug compile for debugging --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-mpi enable MPI parallelization --with-gcc-arch= use architecture for gcc -march/-mtune, instead of guessing --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-blas= use BLAS library --with-lapack= use LAPACK library --without-hdf5 do not allow HDF5 output --with-libctl= specify libctl directory Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory MPICXX MPI C++ compiler command CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF meep configure 1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_compile # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_link # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to meep@ab-initio.mit.edu ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by meep $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Shared-library version number; indicates api compatibility, and is # not the same as the "public" version number. (Don't worry about this # except for public releases.) Note that any change to a C++ class # definition (in the .hpp file) generally breaks binary compatibility. SHARED_VERSION_INFO="8:0:0" # CURRENT:REVISION:AGE am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='meep' VERSION='1.3' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=no fi MEEP_SUFFIX="" ############################################################################## # Check for mpiCC immediately after getting C++ compiler... ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check for MPI library # Check whether --with-mpi was given. if test "${with_mpi+set}" = set; then : withval=$with_mpi; with_mpi=$withval else with_mpi=no fi if test "x$with_mpi" = "xyes"; then for ac_prog in mpic++ mpiCC mpicxx mpCC hcp mpxlC mpxlC_r cmpic++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MPICXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICXX"; then ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPICXX=$ac_cv_prog_MPICXX if test -n "$MPICXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5 $as_echo "$MPICXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MPICXX" && break done test -n "$MPICXX" || MPICXX="$CXX" acx_mpi_save_CXX="$CXX" CXX="$MPICXX" if test x = x"$MPILIBS"; then ac_fn_cxx_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" if test "x$ac_cv_func_MPI_Init" = xyes; then : MPILIBS=" " fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpi_MPI_Init=yes else ac_cv_lib_mpi_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpich_MPI_Init=yes else ac_cv_lib_mpich_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 $as_echo_n "checking for mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else MPILIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXX="$acx_mpi_save_CXX" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then as_fn_error $? "could not find mpi library for --with-mpi" "$LINENO" 5 : else $as_echo "#define HAVE_MPI 1" >>confdefs.h : fi CXX=$MPICXX MEEP_SUFFIX="${MEEP_SUFFIX}_mpi" # Detect stupid MPICH problem with SEEK_SET conflicting between # the mpi.h header file and the stdio.h header file in C++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra flag needed to combine stdio.h and mpi.h" >&5 $as_echo_n "checking for extra flag needed to combine stdio.h and mpi.h... " >&6; } for flag in none -DMPICH_IGNORE_CXX_SEEK unknown; do if test "x$flag" = xunknown; then break; fi save_CPPFLAGS=$CPPFLAGS if test "x$flag" != xnone; then CPPFLAGS="$CPPFLAGS $flag"; fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS=$save_CPPFLAGS done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5 $as_echo "$flag" >&6; } if test "x$flag" = xunknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can combine stdio.h and mpi.h by undef'ing SEEK_*" >&5 $as_echo_n "checking if we can combine stdio.h and mpi.h by undef'ing SEEK_*... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #undef SEEK_SET #undef SEEK_END #undef SEEK_CUR #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define NEED_UNDEF_SEEK_FOR_MPI 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "can't include stdio.h and mpi.h in same file" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi ############################################################################## # Compiler flags # Pick "good" compiler flags(?) # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5 $as_echo_n "checking for C++ compiler vendor... " >&6; } if ${ax_cv_cxx_compiler_vendor+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_cxx_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ 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__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !($vencpp) thisisanerror; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compiler_vendor=`echo $ventest | cut -d: -f1`; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5 $as_echo "$ax_cv_cxx_compiler_vendor" >&6; } # Check whether --enable-portable-binary was given. if test "${enable_portable_binary+set}" = set; then : enableval=$enable_portable_binary; acx_maxopt_portable=$enableval else acx_maxopt_portable=no fi # Try to determine "good" native compiler flags if none specified via CXXFLAGS if test "$ac_test_CXXFLAGS" != "set"; then CXXFLAGS="" case $ax_cv_cxx_compiler_vendor in dec) CXXFLAGS="-w0 -O5 -tune host" # -ansi_alias -ansi_args -fp_reorder ? if test "x$acx_maxopt_portable" = xno; then CXXFLAGS="$CXXFLAGS -arch host" fi;; sun) CXXFLAGS="-native -fast -dalign" # -xO5 ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS -xarch=generic" fi;; hp) CXXFLAGS="+Oall +DSnative" # +Optrs_ansi ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS +DAportable" fi;; ibm) if test "x$acx_maxopt_portable" = xno; then xlc_opt="-qarch=auto -qtune=auto" else xlc_opt="-qtune=auto" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $xlc_opt" >&5 $as_echo_n "checking whether C++ compiler accepts $xlc_opt... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$xlc_opt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="-O3 -qansialias -w $xlc_opt" else CXXFLAGS="-O3 -qansialias -w" echo "******************************************************" echo "* You seem to have the IBM C compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CXXFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CXXFLAGS environment var. *" echo "* and re-run configure.) For more info, man xlC. *" echo "******************************************************" fi ;; intel) CXXFLAGS="-O3" # -ansi_alias ? if test "x$acx_maxopt_portable" = xno; then icc_archflag=unknown icc_flags="" # -xN etcetera are for older versions of icc: case $host_cpu in i686*|x86_64*) # icc accepts gcc assembly syntax, so these should work: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 $as_echo_n "checking for x86 cpuid 0 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 $as_echo_n "checking for x86 cpuid 1 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_1+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_1=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *6a?:*[234]:*:*|*6[789b]?:*:*:*) icc_flags="-xK";; *f3[347]:*:*:*|*f41347:*:*:*) icc_flags="-xP -xN -xW -xK";; *f??:*:*:*) icc_flags="-xN -xW -xK";; esac ;; esac ;; esac # newer icc versions should support -xHost icc_flags="-xHost $icc_flags" if test "x$icc_flags" != x; then for flag in $icc_flags; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then icc_archflag=$flag; break else : fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc architecture flag" >&5 $as_echo_n "checking for icc architecture flag... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $icc_archflag" >&5 $as_echo "$icc_archflag" >&6; } if test "x$icc_archflag" != xunknown; then CXXFLAGS="$CXXFLAGS $icc_archflag" fi fi ;; gnu) # default optimization flags for g++ on all systems CXXFLAGS="-O3" # -malign-double for x86 systems { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -malign-double" >&5 $as_echo_n "checking whether C++ compiler accepts -malign-double... " >&6; } if ${ax_cv_cxx_flags__malign_double+:} false; then : $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-malign-double" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_flags__malign_double=yes else ax_cv_cxx_flags__malign_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__malign_double { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="$CXXFLAGS -malign-double" else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -fstrict-aliasing" >&5 $as_echo_n "checking whether C++ compiler accepts -fstrict-aliasing... " >&6; } if ${ax_cv_cxx_flags__fstrict_aliasing+:} false; then : $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-fstrict-aliasing" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_flags__fstrict_aliasing=yes else ax_cv_cxx_flags__fstrict_aliasing=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__fstrict_aliasing { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="$CXXFLAGS -fstrict-aliasing" else : fi # note that we enable "unsafe" fp optimization with other compilers, too { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -ffast-math" >&5 $as_echo_n "checking whether C++ compiler accepts -ffast-math... " >&6; } if ${ax_cv_cxx_flags__ffast_math+:} false; then : $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-ffast-math" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_flags__ffast_math=yes else ax_cv_cxx_flags__ffast_math=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__ffast_math { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CFLAGS="$CFLAGS -ffast-math" else : fi # Check whether --with-gcc-arch was given. if test "${with_gcc_arch+set}" = set; then : withval=$with_gcc_arch; ax_gcc_arch=$withval else ax_gcc_arch=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 $as_echo_n "checking for gcc architecture flag... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } if ${ax_cv_gcc_archflag+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_gcc_archflag="unknown" if test "$GCC" = yes; then if test "x$ax_gcc_arch" = xyes; then ax_gcc_arch="" if test "$cross_compiling" = no; then case $host_cpu in i[3456]86*|x86_64*|amd64*) # use cpuid codes, in part from x86info-1.21 by D. Jones ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 $as_echo_n "checking for x86 cpuid 0 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 $as_echo_n "checking for x86 cpuid 1 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_1+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_1=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu case $ax_cv_gcc_x86_cpuid_0 in *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *5[48]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; *5??:*:*:*) ax_gcc_arch=pentium ;; *6[3456]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[01]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[234]:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[78b]?:*:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[9d]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; *6[e]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; # Core Duo *6f?:*:*:*) ax_gcc_arch="core2 native pentium-m pentium3 pentiumpro" ;; *6??:*:*:*) ax_gcc_arch="native pentiumpro" ;; *f3[347]:*:*:*|*f4[1347]:*:*:*) case $host_cpu in x86_64*|amd64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; *) ax_gcc_arch="prescott pentium4 pentiumpro" ;; esac ;; *f??:*:*:*) ax_gcc_arch="native pentium4 pentiumpro";; esac ;; *:68747541:*:*) # AMD case $ax_cv_gcc_x86_cpuid_1 in *5[67]?:*:*:*) ax_gcc_arch=k6 ;; *5[8c]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; *5[9d]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; *60?:*:*:*) ax_gcc_arch=k7 ;; *6[12]?:*:*:*) ax_gcc_arch="athlon k7" ;; *6[34]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; *6[68a]?:*:*:*) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x80000006 output" >&5 $as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0x80000006+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0x80000006=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x80000006, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # L2 cache size case $ax_cv_gcc_x86_cpuid_0x80000006 in *:*:*[1-9a-f]??????:*) # (L2 = ecx >> 16) >= 256 ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; *) ax_gcc_arch="athlon-4 athlon k7" ;; esac ;; *f[4cef8b]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; *f5?:*:*:*) ax_gcc_arch="opteron k8" ;; *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; *f??:*:*:*) ax_gcc_arch="native k8" ;; esac ;; *:746e6543:*:*) # IDT case $ax_cv_gcc_x86_cpuid_1 in *54?:*:*:*) ax_gcc_arch=winchip-c6 ;; *58?:*:*:*) ax_gcc_arch=winchip2 ;; *6[78]?:*:*:*) ax_gcc_arch=c3 ;; *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; esac ;; esac if test x"$ax_gcc_arch" = x; then # fallback case $host_cpu in i586*) ax_gcc_arch="native pentium" ;; i686*) ax_gcc_arch="native pentiumpro" ;; x86_64*|amd64*) ax_gcc_arch="native" ;; esac fi ;; sparc*) # Extract the first word of "prtdiag", so it can be a program name with args. set dummy prtdiag; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PRTDIAG+:} false; then : $as_echo_n "(cached) " >&6 else case $PRTDIAG in [\\/]* | ?:[\\/]*) ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" ;; esac fi PRTDIAG=$ac_cv_path_PRTDIAG if test -n "$PRTDIAG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRTDIAG" >&5 $as_echo "$PRTDIAG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` case $cputype in *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; *supersparc*|*tms390z5[05]*) ax_gcc_arch="supersparc v8" ;; *hypersparc*|*rt62[056]*) ax_gcc_arch="hypersparc v8" ;; *cypress*) ax_gcc_arch=cypress ;; esac ;; alphaev5) ax_gcc_arch=ev5 ;; alphaev56) ax_gcc_arch=ev56 ;; alphapca56) ax_gcc_arch="pca56 ev56" ;; alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; alphaev6) ax_gcc_arch=ev6 ;; alphaev67) ax_gcc_arch=ev67 ;; alphaev68) ax_gcc_arch="ev68 ev67" ;; alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; powerpc*) cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` case $cputype in *750*) ax_gcc_arch="750 G3" ;; *740[0-9]*) ax_gcc_arch="$cputype 7400 G4" ;; *74[4-5][0-9]*) ax_gcc_arch="$cputype 7450 G4" ;; *74[0-9][0-9]*) ax_gcc_arch="$cputype G4" ;; *970*) ax_gcc_arch="970 G5 power4";; *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; 603ev|8240) ax_gcc_arch="$cputype 603e 603";; *Cell*) ax_gcc_arch="cellppu cell";; *) ax_gcc_arch="$cputype native" ;; esac ax_gcc_arch="$ax_gcc_arch powerpc" ;; esac fi # not cross-compiling fi # guess arch if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then for arch in $ax_gcc_arch; do if test "x$acx_maxopt_portable" = xyes; then # if we require portable code flags="-mtune=$arch" # -mcpu=$arch and m$arch generate nonportable code on every arch except # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. case $host_cpu in i*86|x86_64*|amd64*) flags="$flags -mcpu=$arch -m$arch";; esac else flags="-march=$arch -mcpu=$arch -m$arch" fi for flag in $flags; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then ax_cv_gcc_archflag=$flag; break else : fi done test "x$ax_cv_gcc_archflag" = xunknown || break done fi fi # $GCC=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 $as_echo_n "checking for gcc architecture flag... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_archflag" >&5 $as_echo "$ax_cv_gcc_archflag" >&6; } if test "x$ax_cv_gcc_archflag" = xunknown; then : else CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag" fi ;; esac if test -z "$CXXFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CXXFLAGS for this system *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CXXFLAGS="-O3" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $CXXFLAGS" >&5 $as_echo_n "checking whether C++ compiler accepts $CXXFLAGS... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then : else echo "" echo "********************************************************" echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "********************************************************" echo "" CXXFLAGS="" fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug=$enableval else enable_debug=no fi if test "$enable_debug" = "yes"; then CFLAGS="-g" CXXFLAGS="-g" FFLAGS="-g" $as_echo "#define DEBUG 1" >>confdefs.h fi # Add lots of compiler warnings in maintainer mode if we are using gcc: # (The variable $GXX is set to "yes" by AC_PROG_CXX if we are using g++.) if test "$GXX" = "yes" && test "$USE_MAINTAINER_MODE" = yes; then CXXFLAGS="$CXXFLAGS -Wall -W" fi # For some annoying reason, g++ requires you to compile # all code with -march if you compile any code with -march, # otherwise segfaults can occur (observed in g++ 3.3.5). # We also need to be careful about -malign-double. ARCHFLAG="" for flg in $CXXFLAGS; do case $flg in -march=*|-mcpu=*|-malign*) ARCHFLAG="$ARCHFLAG $flg" ;; esac done ############################################################################## # More checks case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Extract the first word of "latex2html", so it can be a program name with args. set dummy latex2html; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LATEX2HTML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LATEX2HTML"; then ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LATEX2HTML="latex2html" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LATEX2HTML=$ac_cv_prog_LATEX2HTML if test -n "$LATEX2HTML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX2HTML" >&5 $as_echo "$LATEX2HTML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$LATEX2HTML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find latex2html in your path!" >&5 $as_echo "$as_me: WARNING: Cannot find latex2html in your path!" >&2;} # FIXME: use standard 'missing' script from automake LATEX2HTML='echo not running latex2html...' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_plan_dft_1d in -lfftw3" >&5 $as_echo_n "checking for fftw_plan_dft_1d in -lfftw3... " >&6; } if ${ac_cv_lib_fftw3_fftw_plan_dft_1d+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_plan_dft_1d (); int main () { return fftw_plan_dft_1d (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_fftw3_fftw_plan_dft_1d=yes else ac_cv_lib_fftw3_fftw_plan_dft_1d=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_plan_dft_1d" >&5 $as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_1d" >&6; } if test "x$ac_cv_lib_fftw3_fftw_plan_dft_1d" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFFTW3 1 _ACEOF LIBS="-lfftw3 $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_create_plan in -ldfftw" >&5 $as_echo_n "checking for fftw_create_plan in -ldfftw... " >&6; } if ${ac_cv_lib_dfftw_fftw_create_plan+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldfftw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_create_plan (); int main () { return fftw_create_plan (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_dfftw_fftw_create_plan=yes else ac_cv_lib_dfftw_fftw_create_plan=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dfftw_fftw_create_plan" >&5 $as_echo "$ac_cv_lib_dfftw_fftw_create_plan" >&6; } if test "x$ac_cv_lib_dfftw_fftw_create_plan" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDFFTW 1 _ACEOF LIBS="-ldfftw $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_create_plan in -lfftw" >&5 $as_echo_n "checking for fftw_create_plan in -lfftw... " >&6; } if ${ac_cv_lib_fftw_fftw_create_plan+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_create_plan (); int main () { return fftw_create_plan (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_fftw_fftw_create_plan=yes else ac_cv_lib_fftw_fftw_create_plan=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw_fftw_create_plan" >&5 $as_echo "$ac_cv_lib_fftw_fftw_create_plan" >&6; } if test "x$ac_cv_lib_fftw_fftw_create_plan" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFFTW 1 _ACEOF LIBS="-lfftw $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FFTW needed for MPB" >&5 $as_echo "$as_me: WARNING: FFTW needed for MPB" >&2;} fi fi fi ########################################################################### ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if ${ac_cv_f77_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if ${ac_cv_prog_f77_g+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_direct_absolute_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no inherit_rpath_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds reload_flag_F77=$reload_flag reload_cmds_F77=$reload_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_F77='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_F77= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_F77='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl_F77='-Xlinker ' if test -n "$lt_prog_compiler_pic_F77"; then lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fPIC' lt_prog_compiler_static_F77='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl_F77='-Wl,-Wl,,' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fPIC' lt_prog_compiler_static_F77='-static' ;; *Portland\ Group*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_F77='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= always_export_symbols_F77=no archive_cmds_F77= archive_expsym_cmds_F77= compiler_needs_object_F77=no enable_shared_with_static_runtimes_F77=no export_dynamic_flag_spec_F77= export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic_F77=no hardcode_direct_F77=no hardcode_direct_absolute_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported inherit_rpath_F77=no link_all_deplibs_F77=unknown module_cmds_F77= module_expsym_cmds_F77= old_archive_from_new_cmds_F77= old_archive_from_expsyms_cmds_F77= thread_safe_flag_spec_F77= whole_archive_flag_spec_F77= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='' ;; m68k) archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' export_dynamic_flag_spec_F77='${wl}--export-all-symbols' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; haiku*) archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_F77=yes ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes file_list_spec_F77='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_F77='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__F77+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__F77 fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__F77+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__F77 fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_F77='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' fi archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='' ;; m68k) archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes file_list_spec_F77='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' enable_shared_with_static_runtimes_F77=yes exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds_F77='chmod 644 $oldlib' postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes_F77=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' compiler_needs_object_F77=yes else whole_archive_flag_spec_F77='' fi link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat > conftest.$ac_ext <<_ACEOF subroutine foo end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: inherit_rpath_F77=yes link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no hardcode_direct_absolute_F77=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi archive_cmds_need_lc_F77='no' hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds_F77='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-R,$libdir' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec_F77='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no with_gnu_ld_F77=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_F77=no else lt_cv_archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || test -n "$runpath_var_F77" || test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink || test "$inherit_rpath_F77" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 $as_echo_n "checking how to get verbose linking output from $F77... " >&6; } if ${ac_cv_prog_f77_v+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # With xlf replace commas with spaces, # and remove "-link" and closing parenthesis. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed ' s/,/ /g s/ -link / /g s/) *$// ' ` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. *fort77*f2c*gcc*) ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n ' /:[ ]\+Running[ ]\{1,\}"gcc"/{ /"-c"/d /[.]c"*/d s/^.*"gcc"/"gcc"/ s/"//gp }'` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac # look for -l* and *.a constructs in the output for ac_arg in $ac_f77_v_output; do case $ac_arg in [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) ac_cv_prog_f77_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_f77_v"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 $as_echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 $as_echo "$ac_cv_prog_f77_v" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 $as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } if ${ac_cv_f77_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # With xlf replace commas with spaces, # and remove "-link" and closing parenthesis. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed ' s/,/ /g s/ -link / /g s/) *$// ' ` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. *fort77*f2c*gcc*) ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n ' /:[ ]\+Running[ ]\{1,\}"gcc"/{ /"-c"/d /[.]c"*/d s/^.*"gcc"/"gcc"/ s/"//gp }'` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac ac_cv_f77_libs= # Save positional arguments (if any) ac_save_positional="$@" set X $ac_f77_v_output while test $# != 1; do shift ac_arg=$1 case $ac_arg in [\\/]*.a | ?:[\\/]*.a) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -bI:*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) case $host_os in *cygwin*) ;; *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; -[LRuYz]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $2 in "" | -*);; *) ac_arg="$ac_arg$2" shift; shift set X $ac_arg "$@" ;; esac ;; -YP,*) for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi done ;; -[lLR]*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_ld_run_path; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 $as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 $as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } if ${ac_cv_f77_dummy_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # First, try linking without a dummy main: cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none else ac_cv_fortran_dummy_main=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define $ac_fortran_dm_var $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main rm -rf conftest* LIBS=$ac_f77_dm_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 $as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then cat >>confdefs.h <<_ACEOF #define F77_DUMMY_MAIN $F77_DUMMY_MAIN _ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then $as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 $as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } if ${ac_cv_f77_mangling+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return end subroutine foo_bar() return end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success_extra" = "yes"; then ac_cv_f77_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" fi else ac_cv_f77_mangling="unknown" fi else ac_cv_f77_mangling="unknown" fi LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 $as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$with_lapack" != xno -o "x$with_blas" != xno; then acx_blas_ok=no # Check whether --with-blas was given. if test "${with_blas+set}" = set; then : withval=$with_blas; fi case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="SGEMM" ;; lower*) ac_val="sgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac sgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DGEMM" ;; lower*) ac_val="dgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac dgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_blas_ok=yes else BLAS_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 $as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ATL_xerbla (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ATL_xerbla (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes else ac_cv_lib_atlas_ATL_xerbla=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lf77blas" >&5 $as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if ${ac_cv_lib_cblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_dgemm=yes else ac_cv_lib_cblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_cblas_cblas_dgemm" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi fi fi fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dgemm in -ldgemm" >&5 $as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsgemm" >&5 $as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi fi fi fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_mkl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lmkl" >&5 $as_echo_n "checking for $sgemm in -lmkl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lmkl" fi fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-framework vecLib" fi LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcxml" >&5 $as_echo_n "checking for $sgemm in -lcxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -ldxml" >&5 $as_echo_n "checking for $sgemm in -ldxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } if ${ac_cv_lib_sunmath_acosp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acosp (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return acosp (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes else ac_cv_lib_sunmath_acosp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsunperf" >&5 $as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi fi fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lscs" >&5 $as_echo_n "checking for $sgemm in -lscs... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lessl" >&5 $as_echo_n "checking for $sgemm in -lessl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi fi fi # Generic BLAS library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi fi LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then $as_echo "#define HAVE_BLAS 1" >>confdefs.h : else acx_blas_ok=no fi acx_lapack_ok=no # Check whether --with-lapack was given. if test "${with_lapack+set}" = set; then : withval=$with_lapack; fi case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="CHEEV" ;; lower*) ac_val="cheev" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cheev="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_lapack_ok=yes else LAPACK_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 $as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$cheev" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 $as_echo_n "checking for $cheev in -l$lapack... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi LIBS="$save_LIBS" fi done # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then $as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else acx_lapack_ok=no fi LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" fi ########################################################################### # Harminv library # First, try pkg-config, if it is installed. Note that, annoyingly, # pkg-config doesn't look in /usr/local by default, so we have to # add this to the path for that common case. It also doesn't give # us a way to print its default path, grr, so we have to assume that this # is /usr/lib/pkgconfig. PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for harminv >= 1.1" >&5 $as_echo_n "checking for harminv >= 1.1... " >&6; } if $PKG_CONFIG --exists "harminv >= 1.1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking HARMINV_CFLAGS" >&5 $as_echo_n "checking HARMINV_CFLAGS... " >&6; } HARMINV_CFLAGS=`$PKG_CONFIG --cflags "harminv >= 1.1"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HARMINV_CFLAGS" >&5 $as_echo "$HARMINV_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking HARMINV_LIBS" >&5 $as_echo_n "checking HARMINV_LIBS... " >&6; } HARMINV_LIBS=`$PKG_CONFIG --libs "harminv >= 1.1"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HARMINV_LIBS" >&5 $as_echo "$HARMINV_LIBS" >&6; } else HARMINV_CFLAGS="" HARMINV_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. HARMINV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "harminv >= 1.1"` fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then CFLAGS="$CFLAGS $HARMINV_CFLAGS"; LIBS="$HARMINV_LIBS $LIBS"; have_harminv=yes else have_harminv=no fi # As a fallback, check manually for BLAS/LAPACK and harminv libraries: if test $have_harminv = no; then if test "x$acx_lapack_ok" = x; then acx_blas_ok=no # Check whether --with-blas was given. if test "${with_blas+set}" = set; then : withval=$with_blas; fi case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="SGEMM" ;; lower*) ac_val="sgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac sgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DGEMM" ;; lower*) ac_val="dgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac dgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_blas_ok=yes else BLAS_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 $as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ATL_xerbla (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ATL_xerbla (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes else ac_cv_lib_atlas_ATL_xerbla=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lf77blas" >&5 $as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if ${ac_cv_lib_cblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_dgemm=yes else ac_cv_lib_cblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_cblas_cblas_dgemm" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi fi fi fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dgemm in -ldgemm" >&5 $as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsgemm" >&5 $as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi fi fi fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_mkl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lmkl" >&5 $as_echo_n "checking for $sgemm in -lmkl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lmkl" fi fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-framework vecLib" fi LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcxml" >&5 $as_echo_n "checking for $sgemm in -lcxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -ldxml" >&5 $as_echo_n "checking for $sgemm in -ldxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } if ${ac_cv_lib_sunmath_acosp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acosp (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return acosp (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes else ac_cv_lib_sunmath_acosp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsunperf" >&5 $as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi fi fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lscs" >&5 $as_echo_n "checking for $sgemm in -lscs... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lessl" >&5 $as_echo_n "checking for $sgemm in -lessl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi fi fi # Generic BLAS library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi fi LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then $as_echo "#define HAVE_BLAS 1" >>confdefs.h : else acx_blas_ok=no fi acx_lapack_ok=no # Check whether --with-lapack was given. if test "${with_lapack+set}" = set; then : withval=$with_lapack; fi case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="CHEEV" ;; lower*) ac_val="cheev" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cheev="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_lapack_ok=yes else LAPACK_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 $as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$cheev" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 $as_echo_n "checking for $cheev in -l$lapack... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi LIBS="$save_LIBS" fi done # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then $as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else acx_lapack_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BLAS/LAPACK needed for harminv" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for harminv" >&2;} fi LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" elif test "x$acx_lapack_ok" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BLAS/LAPACK needed for harminv" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for harminv" >&2;} fi save_CC=$CC CC=$CXX # harminv test must use $CXX since harminv may be a C++ lib # just use lapack/blas in default libs since we always need them { $as_echo "$as_me:${as_lineno-$LINENO}: checking for harminv_get_freq_error in -lharminv" >&5 $as_echo_n "checking for harminv_get_freq_error in -lharminv... " >&6; } if ${ac_cv_lib_harminv_harminv_get_freq_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char harminv_get_freq_error (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return harminv_get_freq_error (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_harminv_harminv_get_freq_error=yes else ac_cv_lib_harminv_harminv_get_freq_error=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_harminv_harminv_get_freq_error" >&5 $as_echo "$ac_cv_lib_harminv_harminv_get_freq_error" >&6; } if test "x$ac_cv_lib_harminv_harminv_get_freq_error" = xyes; then : have_harminv=yes; LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: harminv support is disabled" >&5 $as_echo "$as_me: WARNING: harminv support is disabled" >&2;} fi CC=$save_CC fi if test $have_harminv = yes; then $as_echo "#define HAVE_HARMINV 1" >>confdefs.h fi ########################################################################### # MPB library ac_fn_cxx_check_header_mongrel "$LINENO" "mpb.h" "ac_cv_header_mpb_h" "$ac_includes_default" if test "x$ac_cv_header_mpb_h" = xyes; then : have_mpb=maybe else have_mpb=no fi if test $have_mpb = maybe; then if test "x$acx_lapack_ok" = x -a "$have_harminv" = xno; then acx_blas_ok=no # Check whether --with-blas was given. if test "${with_blas+set}" = set; then : withval=$with_blas; fi case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="SGEMM" ;; lower*) ac_val="sgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac sgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DGEMM" ;; lower*) ac_val="dgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac dgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_blas_ok=yes else BLAS_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 $as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ATL_xerbla (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ATL_xerbla (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes else ac_cv_lib_atlas_ATL_xerbla=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lf77blas" >&5 $as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if ${ac_cv_lib_cblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_dgemm=yes else ac_cv_lib_cblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_cblas_cblas_dgemm" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi fi fi fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dgemm in -ldgemm" >&5 $as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsgemm" >&5 $as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi fi fi fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_mkl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lmkl" >&5 $as_echo_n "checking for $sgemm in -lmkl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lmkl" fi fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$sgemm" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-framework vecLib" fi LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcxml" >&5 $as_echo_n "checking for $sgemm in -lcxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -ldxml" >&5 $as_echo_n "checking for $sgemm in -ldxml... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } if ${ac_cv_lib_sunmath_acosp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acosp (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return acosp (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes else ac_cv_lib_sunmath_acosp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsunperf" >&5 $as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi fi fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lscs" >&5 $as_echo_n "checking for $sgemm in -lscs... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lessl" >&5 $as_echo_n "checking for $sgemm in -lessl... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi fi fi # Generic BLAS library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi fi LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then $as_echo "#define HAVE_BLAS 1" >>confdefs.h : else acx_blas_ok=no fi acx_lapack_ok=no # Check whether --with-lapack was given. if test "${with_lapack+set}" = set; then : withval=$with_lapack; fi case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="CHEEV" ;; lower*) ac_val="cheev" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cheev="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_lapack_ok=yes else LAPACK_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 $as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$cheev" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 $as_echo_n "checking for $cheev in -l$lapack... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi LIBS="$save_LIBS" fi done # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then $as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else acx_lapack_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BLAS/LAPACK needed for MPB" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for MPB" >&2;} fi LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" elif test "x$acx_lapack_ok" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BLAS/LAPACK needed for MPB" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for MPB" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maxwell_target_operator1 in -lmpb" >&5 $as_echo_n "checking for maxwell_target_operator1 in -lmpb... " >&6; } if ${ac_cv_lib_mpb_maxwell_target_operator1+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char maxwell_target_operator1 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return maxwell_target_operator1 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpb_maxwell_target_operator1=yes else ac_cv_lib_mpb_maxwell_target_operator1=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpb_maxwell_target_operator1" >&5 $as_echo "$ac_cv_lib_mpb_maxwell_target_operator1" >&6; } if test "x$ac_cv_lib_mpb_maxwell_target_operator1" = xyes; then : have_mpb=yes; LIBS="-lmpb $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maxwell_target_operator1 in -lmpb" >&5 $as_echo_n "checking for maxwell_target_operator1 in -lmpb... " >&6; } if ${ac_cv_lib_mpb_maxwell_target_operator1+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char maxwell_target_operator1 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return maxwell_target_operator1 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpb_maxwell_target_operator1=yes else ac_cv_lib_mpb_maxwell_target_operator1=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpb_maxwell_target_operator1" >&5 $as_echo "$ac_cv_lib_mpb_maxwell_target_operator1" >&6; } if test "x$ac_cv_lib_mpb_maxwell_target_operator1" = xyes; then : have_mpb=yes; LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPB support is disabled" >&5 $as_echo "$as_me: WARNING: MPB support is disabled" >&2;} fi fi if test $have_mpb = yes; then $as_echo "#define HAVE_MPB 1" >>confdefs.h fi fi ############################################################################## # GNU Scientific Library ac_fn_cxx_check_func "$LINENO" "cblas_cgemm" "ac_cv_func_cblas_cgemm" if test "x$ac_cv_func_cblas_cgemm" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_cgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_cgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_cgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_cgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_cgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_cgemm=yes else ac_cv_lib_gslcblas_cblas_cgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_cblas_cgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_cgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_cgemm" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_sf_bessel_Jn in -lgsl" >&5 $as_echo_n "checking for gsl_sf_bessel_Jn in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_sf_bessel_Jn+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_sf_bessel_Jn (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gsl_sf_bessel_Jn (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_sf_bessel_Jn=yes else ac_cv_lib_gsl_gsl_sf_bessel_Jn=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_sf_bessel_Jn" >&5 $as_echo "$ac_cv_lib_gsl_gsl_sf_bessel_Jn" >&6; } if test "x$ac_cv_lib_gsl_gsl_sf_bessel_Jn" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSL 1 _ACEOF LIBS="-lgsl $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing GNU GSL library...Bessel-function field initialization will not be supported." >&5 $as_echo "$as_me: WARNING: Missing GNU GSL library...Bessel-function field initialization will not be supported." >&2;} fi ############################################################################## # Check for HDF5 library # Check whether --with-hdf5 was given. if test "${with_hdf5+set}" = set; then : withval=$with_hdf5; ok=$withval else ok=yes fi if test "$ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return deflate (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else ac_cv_lib_z_deflate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib is required for HDF5!" >&5 $as_echo "$as_me: WARNING: zlib is required for HDF5!" >&2;} fi save_CC=$CC if test "x$with_mpi" = "xyes"; then CC=$MPICXX fi save_LIBS_0="$LIBS" # save, to check later if we found any library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Pcreate in -lhdf5" >&5 $as_echo_n "checking for H5Pcreate in -lhdf5... " >&6; } if ${ac_cv_lib_hdf5_H5Pcreate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhdf5 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char H5Pcreate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return H5Pcreate (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_hdf5_H5Pcreate=yes else ac_cv_lib_hdf5_H5Pcreate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Pcreate" >&5 $as_echo "$ac_cv_lib_hdf5_H5Pcreate" >&6; } if test "x$ac_cv_lib_hdf5_H5Pcreate" = xyes; then : for ac_header in hdf5.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default" if test "x$ac_cv_header_hdf5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_HDF5_H 1 _ACEOF LIBS="-lhdf5 $LIBS" $as_echo "#define HAVE_HDF5 1" >>confdefs.h fi done fi if test x"$save_LIBS_0" = x"$LIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't find the HDF5 library!! Switching to --without-hdf5." >&5 $as_echo "$as_me: WARNING: Couldn't find the HDF5 library!! Switching to --without-hdf5." >&2;} fi CC=$save_CC if test "x$with_mpi" = "xyes"; then for ac_func in H5Pset_mpi H5Pset_fapl_mpio do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi ############################################################################## RUNCODE="" if test "x$with_mpi" = "xyes"; then # Extract the first word of "mpirun", so it can be a program name with args. set dummy mpirun; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MPIRUN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPIRUN"; then ac_cv_prog_MPIRUN="$MPIRUN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIRUN="mpirun" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPIRUN=$ac_cv_prog_MPIRUN if test -n "$MPIRUN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5 $as_echo "$MPIRUN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi RUNCODE="$MPIRUN -np 4" # always use 4 processes for 'make check' fi ############################################################################## # Libraries and flags (other than -lmeep) required to link Meep: MEEPLIBS="$LDFLAGS $LIBS" ############################################################################## # subsequent libraries are only for libctl front end meep_save_LIBS=$LIBS # Check whether --with-libctl was given. if test "${with_libctl+set}" = set; then : withval=$with_libctl; with_libctl=$withval else with_libctl=yes fi if test "x$with_libctl" = "xno"; then : elif test "x$with_libctl" != "xyes"; then LIBCTL_DIR="$with_libctl" fi if test "x$with_libctl" != xno; then WITH_LIBCTL_TRUE= WITH_LIBCTL_FALSE='#' else WITH_LIBCTL_TRUE='#' WITH_LIBCTL_FALSE= fi ############################################################################## # Check for Guile library and its behavior (for libctl front end): if test "x$with_libctl" != xno; then # Extract the first word of "guile-config", so it can be a program name with args. set dummy guile-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GUILE_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GUILE_CONFIG"; then ac_cv_prog_GUILE_CONFIG="$GUILE_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GUILE_CONFIG="guile-config" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GUILE_CONFIG" && ac_cv_prog_GUILE_CONFIG="unknown" fi fi GUILE_CONFIG=$ac_cv_prog_GUILE_CONFIG if test -n "$GUILE_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUILE_CONFIG" >&5 $as_echo "$GUILE_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$GUILE_CONFIG" = "xunknown"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return readline (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBREADLINE 1 _ACEOF LIBS="-lreadline $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scm_lt_dlinit in -lguile-ltdl" >&5 $as_echo_n "checking for scm_lt_dlinit in -lguile-ltdl... " >&6; } if ${ac_cv_lib_guile_ltdl_scm_lt_dlinit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lguile-ltdl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char scm_lt_dlinit (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return scm_lt_dlinit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_guile_ltdl_scm_lt_dlinit=yes else ac_cv_lib_guile_ltdl_scm_lt_dlinit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_guile_ltdl_scm_lt_dlinit" >&5 $as_echo "$ac_cv_lib_guile_ltdl_scm_lt_dlinit" >&6; } if test "x$ac_cv_lib_guile_ltdl_scm_lt_dlinit" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGUILE_LTDL 1 _ACEOF LIBS="-lguile-ltdl $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lltdl" >&5 $as_echo_n "checking for dlopen in -lltdl... " >&6; } if ${ac_cv_lib_ltdl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_ltdl_dlopen=yes else ac_cv_lib_ltdl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_dlopen" >&5 $as_echo "$ac_cv_lib_ltdl_dlopen" >&6; } if test "x$ac_cv_lib_ltdl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLTDL 1 _ACEOF LIBS="-lltdl $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gh_eval_str in -lguile" >&5 $as_echo_n "checking for gh_eval_str in -lguile... " >&6; } if ${ac_cv_lib_guile_gh_eval_str+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lguile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gh_eval_str (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gh_eval_str (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_guile_gh_eval_str=yes else ac_cv_lib_guile_gh_eval_str=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_guile_gh_eval_str" >&5 $as_echo "$ac_cv_lib_guile_gh_eval_str" >&6; } if test "x$ac_cv_lib_guile_gh_eval_str" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGUILE 1 _ACEOF LIBS="-lguile $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scm_eval_string in -lguile" >&5 $as_echo_n "checking for scm_eval_string in -lguile... " >&6; } if ${ac_cv_lib_guile_scm_eval_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lguile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char scm_eval_string (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return scm_eval_string (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_guile_scm_eval_string=yes else ac_cv_lib_guile_scm_eval_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_guile_scm_eval_string" >&5 $as_echo "$ac_cv_lib_guile_scm_eval_string" >&6; } if test "x$ac_cv_lib_guile_scm_eval_string" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGUILE 1 _ACEOF LIBS="-lguile $LIBS" else as_fn_error $? "linking to guile failed" "$LINENO" 5 fi fi else CPPFLAGS="$CPPFLAGS `$GUILE_CONFIG compile`" LIBS="`$GUILE_CONFIG link` $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking to guile works" >&5 $as_echo_n "checking if linking to guile works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gh_enter (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gh_enter (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char scm_boot_guile (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return scm_boot_guile (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "guile-config is broken" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi for ac_header in libguile.h guile/gh.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check how smob types work in this Guile version: for ac_func in scm_make_smob_type do : ac_fn_cxx_check_func "$LINENO" "scm_make_smob_type" "ac_cv_func_scm_make_smob_type" if test "x$ac_cv_func_scm_make_smob_type" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SCM_MAKE_SMOB_TYPE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCM_SMOB_PREDICATE" >&5 $as_echo_n "checking for SCM_SMOB_PREDICATE... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_SMOB_PREDICATE(1,x); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ok=yes else ok=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then $as_echo "#define HAVE_SCM_SMOB_PREDICATE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCM_SMOB_DATA" >&5 $as_echo_n "checking for SCM_SMOB_DATA... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_SMOB_DATA(x); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ok=yes else ok=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then $as_echo "#define HAVE_SCM_SMOB_DATA 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCM_NEWSMOB" >&5 $as_echo_n "checking for SCM_NEWSMOB... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_NEWSMOB(x,1,0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ok=yes else ok=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then $as_echo "#define HAVE_SCM_NEWSMOB 1" >>confdefs.h fi # Check how to activate Guile readline support: ACTIVATE_READLINE="" if test "x$cross_compiling" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to activate readline in Guile" >&5 $as_echo_n "checking how to activate readline in Guile... " >&6; } ractivate="(use-modules (readline-activator)) (activate-readline)" if guile -c "$ractivate" > /dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: readline-activator" >&5 $as_echo "readline-activator" >&6; } ACTIVATE_READLINE="$ractivate" else ractivate="(use-modules (ice-9 readline)) (activate-readline)" if guile -c "$ractivate" >& /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ice-9 readline" >&5 $as_echo "ice-9 readline" >&6; } ACTIVATE_READLINE="$ractivate" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot" >&5 $as_echo "cannot" >&6; } ACTIVATE_READLINE="" fi fi fi fi # if with_libctl ############################################################################## # Check for libctl library and files if test "x$with_libctl" != xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libctl dir" >&5 $as_echo_n "checking for libctl dir... " >&6; } if test x != x"$LIBCTL_DIR" -a ! -r "$LIBCTL_DIR/base/ctl.scm"; then LIBCTL_DIR="" fi if test x = x"$LIBCTL_DIR" -a -r /usr/local/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/local/share/libctl" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl3/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl3" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl" fi if test x = x"$LIBCTL_DIR"; then as_fn_error $? "could not find libctl files; use --with-libctl=" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCTL_DIR" >&5 $as_echo "$LIBCTL_DIR" >&6; } for ac_prog in gen-ctl-io do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GEN_CTL_IO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GEN_CTL_IO"; then ac_cv_prog_GEN_CTL_IO="$GEN_CTL_IO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GEN_CTL_IO="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GEN_CTL_IO=$ac_cv_prog_GEN_CTL_IO if test -n "$GEN_CTL_IO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEN_CTL_IO" >&5 $as_echo "$GEN_CTL_IO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GEN_CTL_IO" && break done test -n "$GEN_CTL_IO" || GEN_CTL_IO="echo" if test x"$GEN_CTL_IO" = xecho; then as_fn_error $? "could not find gen-ctl-io program; check your PATH" "$LINENO" 5 fi # check for -lctl: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctl_get_vector3 in -lctl" >&5 $as_echo_n "checking for ctl_get_vector3 in -lctl... " >&6; } if ${ac_cv_lib_ctl_ctl_get_vector3+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lctl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ctl_get_vector3 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ctl_get_vector3 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_ctl_ctl_get_vector3=yes else ac_cv_lib_ctl_ctl_get_vector3=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ctl_ctl_get_vector3" >&5 $as_echo "$ac_cv_lib_ctl_ctl_get_vector3" >&6; } if test "x$ac_cv_lib_ctl_ctl_get_vector3" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCTL 1 _ACEOF LIBS="-lctl $LIBS" else as_fn_error $? "Couldn't find the required libctl library." "$LINENO" 5 fi # check for ctl.h (Fedora puts it in /usr/include/ctl, grrr) CTL_H_CPPFLAG="" ac_fn_cxx_check_header_mongrel "$LINENO" "ctl.h" "ac_cv_header_ctl_h" "$ac_includes_default" if test "x$ac_cv_header_ctl_h" = xyes; then : CTL_H_CPPFLAG=" " else save_CPPFLAGS=$CPPFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alternate ctl.h location" >&5 $as_echo_n "checking for alternate ctl.h location... " >&6; } for ctl_h_path in /usr/include/ctl /usr/local/include/ctl; do CPPFLAGS="$save_CPPFLAGS -I$ctl_h_path" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : CTL_H_CPPFLAG=-I$ctl_h_path; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTL_H_CPPFLAG" >&5 $as_echo "$CTL_H_CPPFLAG" >&6; } CPPFLAGS=$save_CPPFLAGS fi if test "x$CTL_H_CPPFLAG" = "x"; then as_fn_error $? "Couldn't find the ctl.h header file for libctl." "$LINENO" 5 fi save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $CTL_H_CPPFLAG" # Check libctl version >= LIBCTL_MAJOR.LIBCTL_MINOR.LIBCTL_BUGFIX LIBCTL_MAJOR=3; LIBCTL_MINOR=2; LIBCTL_BUGFIX=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}" >&5 $as_echo_n "checking whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ [ #include #if LIBCTL_MAJOR_VERSION > $LIBCTL_MAJOR || (LIBCTL_MAJOR_VERSION == $LIBCTL_MAJOR && (LIBCTL_MINOR_VERSION > $LIBCTL_MINOR || (LIBCTL_MINOR_VERSION == $LIBCTL_MINOR && LIBCTL_BUGFIX_VERSION >= $LIBCTL_BUGFIX))) yes #endif ] _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else as_fn_error $? "libctl version ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX} or later is required" "$LINENO" 5 fi rm -f conftest* CPPFLAGS=$save_CPPFLAGS # Check for libctl_quiet feature (in libctl 3.1.1 or later): { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libctl_quiet feature" >&5 $as_echo_n "checking for libctl_quiet feature... " >&6; } if grep libctl_quiet "$LIBCTL_DIR/base/main.c" 2>&1 > /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LIBCTL_QUIET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # On IRIX, basename/dirname functions in libctl/main.c require -lgen { $as_echo "$as_me:${as_lineno-$LINENO}: checking for basename in -lgen" >&5 $as_echo_n "checking for basename in -lgen... " >&6; } if ${ac_cv_lib_gen_basename+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char basename (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return basename (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gen_basename=yes else ac_cv_lib_gen_basename=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_basename" >&5 $as_echo "$ac_cv_lib_gen_basename" >&6; } if test "x$ac_cv_lib_gen_basename" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGEN 1 _ACEOF LIBS="-lgen $LIBS" fi fi # if with_libctl ############################################################################## LIBCTL_LIBS=$LIBS LIBS=$meep_save_LIBS ############################################################################## # The following function is used only for debugging. Note that # we must test for it *after* setting the compiler flags (which # affect whether it is declared, as it is a GNU extension). # We need to #include because that somehow affects whether # the function is declared with older gcc versions. We need # to use AC_TRY_COMPILE because the test in AC_HAVE_DECL seems # to be optimized out. for ac_func in feenableexcept do : ac_fn_cxx_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" if test "x$ac_cv_func_feenableexcept" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FEENABLEEXCEPT 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feenableexcept declaration is usable" >&5 $as_echo_n "checking whether feenableexcept declaration is usable... " >&6; } feenableexcept_decl_ok=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #define _GNU_SOURCE 1 #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { feenableexcept(0); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define HAVE_DECL_FEENABLEEXCEPT 1" >>confdefs.h else feenableexcept_decl_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $feenableexcept_decl_ok" >&5 $as_echo "$feenableexcept_decl_ok" >&6; } ############################################################################## # See if we need to catch SIGFPE to avoid crashing on underflow exceptions # etcetera, since some stupid operating systems (e.g. Alpha/Tru64) crash on # SIGFPE by default. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to catch and ignore SIGFPE signals" >&5 $as_echo_n "checking whether to catch and ignore SIGFPE signals... " >&6; } if test "$cross_compiling" = yes; then : ignore_sigfpe=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { volatile double x=1,y=0; return x/y; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ignore_sigfpe=no else ignore_sigfpe=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ignore_sigfpe" >&5 $as_echo "$ignore_sigfpe" >&6; } if test $ignore_sigfpe = yes; then $as_echo "#define IGNORE_SIGFPE 1" >>confdefs.h fi ############################################################################## # Miscellaneous function and header checks { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in sys/time.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_func in BSDgettimeofday gettimeofday cblas_ddot cblas_daxpy jn do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ############################################################################## # check for restrict keyword in C++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac # check for C99 _Pragma support, so that we can emit pragmas in macros cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { _Pragma("ivdep") ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else $as_echo "#define _Pragma /**/" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ############################################################################## program_transform_name="s,_,-,g;$program_transform_name" ############################################################################## ac_config_files="$ac_config_files Makefile meep-pkgconfig src/Makefile tests/Makefile examples/Makefile libctl/Makefile libctl/meep.scm" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_LIBCTL_TRUE}" && test -z "${WITH_LIBCTL_FALSE}"; then as_fn_error $? "conditional \"WITH_LIBCTL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by meep $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ meep config.status 1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ LD_F77 \ reload_flag_CXX \ reload_flag_F77 \ compiler_CXX \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_CXX \ lt_cv_prog_compiler_c_o_F77 \ export_dynamic_flag_spec_CXX \ export_dynamic_flag_spec_F77 \ whole_archive_flag_spec_CXX \ whole_archive_flag_spec_F77 \ compiler_needs_object_CXX \ compiler_needs_object_F77 \ with_gnu_ld_CXX \ with_gnu_ld_F77 \ allow_undefined_flag_CXX \ allow_undefined_flag_F77 \ no_undefined_flag_CXX \ no_undefined_flag_F77 \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ include_expsyms_CXX \ include_expsyms_F77 \ file_list_spec_CXX \ file_list_spec_F77 \ compiler_lib_search_dirs_CXX \ compiler_lib_search_dirs_F77 \ predep_objects_CXX \ predep_objects_F77 \ postdep_objects_CXX \ postdep_objects_F77 \ predeps_CXX \ predeps_F77 \ postdeps_CXX \ postdeps_F77 \ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ reload_cmds_F77 \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_from_new_cmds_CXX \ old_archive_from_new_cmds_F77 \ old_archive_from_expsyms_cmds_CXX \ old_archive_from_expsyms_cmds_F77 \ archive_cmds_CXX \ archive_cmds_F77 \ archive_expsym_cmds_CXX \ archive_expsym_cmds_F77 \ module_cmds_CXX \ module_cmds_F77 \ module_expsym_cmds_CXX \ module_expsym_cmds_F77 \ export_symbols_cmds_CXX \ export_symbols_cmds_F77 \ prelink_cmds_CXX \ prelink_cmds_F77 \ postlink_cmds_CXX \ postlink_cmds_F77; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "meep-pkgconfig") CONFIG_FILES="$CONFIG_FILES meep-pkgconfig" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "libctl/Makefile") CONFIG_FILES="$CONFIG_FILES libctl/Makefile" ;; "libctl/meep.scm") CONFIG_FILES="$CONFIG_FILES libctl/meep.scm" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX F77 " # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: F77 # The linker used to build libraries. LD=$lt_LD_F77 # How to create reloadable object files. reload_flag=$lt_reload_flag_F77 reload_cmds=$lt_reload_cmds_F77 # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 # A language specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU compiler? with_gcc=$GCC_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_F77 # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_F77 # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_F77 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_F77 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_F77 # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_F77 # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_F77 postdep_objects=$lt_postdep_objects_F77 predeps=$lt_predeps_F77 postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # ### END LIBTOOL TAG CONFIG: F77 _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi meep-1.3/meep-pkgconfig.in0000644000175400001440000000037112315327613012453 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: MEEP Description: time-domain electromagnetic simulation Version: @VERSION@ Libs: -L${libdir} -lmeep@MEEP_SUFFIX@ @MEEPLIBS@ Cflags: -I${includedir} @ARCHFLAG@ meep-1.3/install-sh0000755000175400001440000003325512235234727011247 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-1.3/COPYRIGHT0000644000175400001440000000142212506540354010522 00000000000000/* Copyright (C) 2005-2015 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ meep-1.3/Makefile.in0000644000175400001440000007076112506540651011310 00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/meep-pkgconfig.in AUTHORS \ COPYING INSTALL NEWS TODO compile config.guess config.sub \ depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = meep-pkgconfig CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = src libctl tests examples DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MPIRUN = @MPIRUN@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_LIBCTL_FALSE@LIBCTL = @WITH_LIBCTL_TRUE@LIBCTL = libctl ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src $(LIBCTL) tests examples EXTRA_DIST = COPYRIGHT m4 meep-pkgconfig.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = meep@MEEP_SUFFIX@.pc DISTCLEANFILES = meep@MEEP_SUFFIX@.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 meep-pkgconfig: $(top_builddir)/config.status $(srcdir)/meep-pkgconfig.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-pkgconfigDATA \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pkgconfigDATA meep@MEEP_SUFFIX@.pc: meep-pkgconfig cp -f $(top_builddir)/meep-pkgconfig $@ libmeep: cd src && $(MAKE) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-1.3/AUTHORS0000644000175400001440000000045112315330205010266 00000000000000In roughly chronological order: David Roundy Mihai Ibanescu Peter Bermel Steven G. Johnson Ardavan Farjadpour Oskooi Alejandro Rodriguez Alexander McCauley meep-1.3/libctl/0000755000175400001440000000000012506541114010554 500000000000000meep-1.3/libctl/Makefile.am0000644000175400001440000001155012506540456012542 00000000000000bin_PROGRAMS = meep@MEEP_SUFFIX@ EXTRA_DIST = meep.scm.in meep-enums.scm casimir.scm meep_wrap.patch LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la HDRS = meep-ctl.hpp meep-ctl-const.hpp meep-ctl-swig.hpp LIBHDRS = $(top_srcdir)/src/meep.hpp $(top_srcdir)/src/meep/vec.hpp $(top_srcdir)/src/meep/mympi.hpp CTLHDRS = $(LIBHDRS) $(srcdir)/meep-ctl.hpp $(top_builddir)/config.h $(srcdir)/meep-ctl-const.hpp ctl-io.h meep@MEEP_SUFFIX@_SOURCES = meep.cpp structure.cpp meep_wrap.cxx $(HDRS) meep.i meep_op_renames.i meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i nodist_meep@MEEP_SUFFIX@_SOURCES = main.cpp geom.cpp ctl-io.cpp ctl-io.h ctl-io.i meep@MEEP_SUFFIX@_LDADD = $(LIBMEEP) @LIBCTL_LIBS@ BUILT_SOURCES = $(nodist_meep_SOURCES) meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i meep-enums.scm meep_wrap.cxx # manual dependency hack to force the build order in certain cases # ... for some reason automake's automatic dependencies are not working here meep.o: meep.cpp meep-enums.scm $(CTLHDRS) structure.o: structure.cpp $(CTLHDRS) meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS) if WITH_LIBCTL if MAINTAINER_MODE meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS) swig -I$(top_srcdir)/src -c++ -guile -o $@ meep.i patch -p0 $@ < $(srcdir)/meep_wrap.patch else meep_wrap.cxx: echo "#error need --with-maintainer-mode to generate this file" 1>&2 exit 1 endif else meep_wrap.cxx: echo "#error need --with-libctl to generate this file" > $@ endif # workaround missing namespace prefix in swig meep_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; sed 's/^ *class \+\([A-Za-z_0-9:]*\)\( *\| *:[^{]*\){.*$$/%rename(meep_\1) meep::\1;/' $(LIBHDRS) | grep "%rename" | sort -u; echo; grep -hv typedef $(LIBHDRS) | sed 's/\(inline\|const\|extern\|static\) \+//g' | sed 's/^[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%rename(meep_\1) meep::\1;/' | grep "%rename" | sort -u; ) > $@ # work around bug in swig, where it doesn't prepend namespace to friend funcs meep_swig_bug_workaround.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; grep -h friend $(LIBHDRS) | sed 's/^ *friend \+[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%ignore \1;/' | grep "%ignore" | sort -u;) > $@ meep_enum_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; for f in $(LIBHDRS); do egrep "^enum" $$f | sed 's/enum \+\([A-Za-z_0-9:]\+\).*$$/\1/g' | while read enum; do cat $$f | tr -d '\n' | sed 's/.*enum \+'$${enum}' *{\([^}]*\)}.*/\1/g' | sed 's/= *[0-9]\+//g' |tr -d ' \t' | tr ',' '\n' | sed 's/^.*$$/'"%rename(meep_$${enum}_\0) meep::\0;/g"; echo; done; done;) > $@ meep-enums.scm: meep_enum_renames.i (sed 's/%rename(\([A-Za-z0-9_]*\)) *\([A-Za-z0-9:_]*\);$$/(define \2 (\1))/' meep_enum_renames.i | sed 's/[A-Za-z0-9:_]*:://g' | sed 's/_/-/g' | sed 's,//,;,'; echo "(define Centered Dielectric)") > $@ ############################################################################## # stuff below is based on example Makefile.in included with libctl ############################################################################## # what is printed out when invoking your program with --version: VERSION_STRING = "Meep @VERSION@, Copyright (C) 2005-2015 Massachusetts Insitute of Technology." MY_DEFS = -DHAVE_CTL_HOOKS=1 -DHAVE_CTL_EXPORT_HOOK=1 PROGRAM_NAME = meep SPECIFICATION_FILE = $(PROGRAM_NAME).scm nodist_pkgdata_DATA = $(SPECIFICATION_FILE) meep-enums.scm casimir.scm ############################################################################## AM_CPPFLAGS = -I$(top_srcdir)/src $(MY_DEFS) $(CTL_DEFS) $(CTL_H_CPPFLAG) # libctl install. dir., e.g. /usr/local/share/libctl LIBCTL_DIR = @LIBCTL_DIR@ # gen-ctl-io program GEN_CTL_IO = @GEN_CTL_IO@ ############################################################################## CTL_DEFS = -DCTL_SCM='"'$(LIBCTL_DIR)/base/ctl.scm'"' \ -DINCLUDE_SCM='"'$(LIBCTL_DIR)/base/include.scm'"' \ -DSPEC_SCM='"'$(pkgdatadir)/$(SPECIFICATION_FILE)'"' \ -DVERSION_STRING='"'$(VERSION_STRING)'"' ############################################################################## ctl-io.cpp: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm ctl-io.h $(GEN_CTL_IO) --cxx --code -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.h: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --header -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.i: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --swig -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) main.cpp: $(LIBCTL_DIR)/base/main.c ctl-io.h cp -f $(LIBCTL_DIR)/base/main.c $@ geom.cpp: $(LIBCTL_DIR)/utils/geom.c ctl-io.h cp -f $(LIBCTL_DIR)/utils/geom.c $@ clean-local: rm -f $(nodist_meep_SOURCES) meep-enums.scm ctl-io.* main.* geom.* maintainer-clean-local: rm -f $(BUILT_SOURCES) meep-1.3/libctl/casimir.scm0000644000175400001440000002612212315330220012622 00000000000000;given m1 m2, make a composit index n; the inverse is casimir-source-info below ; m1 = r-c, m2 = c => r = m1+m2; n - s = m2 => n = m2 + s; s = (sum_(k=1)^r k) ; => n = m2 + (sum_(k=1)^(m1+m2) k) = m2 + 1/2 (m1+m2) * (m1+m2+1) (define (make-casimir-src-index m1 m2) (+ m2 (* (/ 2) (+ m1 m2) (+ m1 m2 1)))) ; return a list (source-vol mx my mz) ; given the volume integration-vol and n, pick out the appropriate side and mx my mz to use ; sides are ordered by decreasing weight ; weights are w(side, m) = area(side)/total area * 1/(m+1)^4, a rough estimate of the ; contribution to the stress tensor from that side and that m (define (casimir-source-info integration-vol n) (define (modround x n) (modulo (inexact->exact (round x)) n)) (define (get-src-index n) ;given n, extract out the two values of m for 3-d (let* ((s 0) ;sum of diagonals (r 0) ;row intersection (c 0));column intersection (while (< (+ s r) n) (set! r (+ r 1)) (set! s (+ s r))) (set! c (- n s)) (list (- r c) c))) (let* ((min-corner (meep-volume-get-min-corner integration-vol)) (max-corner (meep-volume-get-max-corner integration-vol)) (size-vec (vector3- max-corner min-corner)) (center-vec (vector3+ (vector3-scale 0.5 size-vec) min-corner)) (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (xshift (vector3 (/ sx 2) 0 0)) (yshift (vector3 0 (/ sy 2) 0)) (zshift (vector3 0 0 (/ sz 2)))) (if (and (> sy 1e-15) (> sz 1e-15)) ;3d cartesian: n = 6*f(m1,m2) + s (let* ((s (modround n 6)) (nr (/ (- n s) 6)) (ms (get-src-index nr)) ;get (m1 m2) (m1 (first ms)) (m2 (second ms)) (x-const (vector3 0 sy sz)) (y-const (vector3 sx 0 sz)) (z-const (vector3 sx sy 0)) (center-list (list (vector3- center-vec xshift) (vector3+ center-vec xshift) (vector3- center-vec yshift) (vector3+ center-vec yshift) (vector3- center-vec zshift) (vector3+ center-vec zshift))) (m-list (list (vector3 0 m1 m2) (vector3 0 m1 m2) (vector3 m1 0 m2) (vector3 m1 0 m2) (vector3 m1 m2 0) (vector3 m1 m2 0))) (orientation-list (list -1 1 -1 1 -1 1)) (size-list (list x-const x-const y-const y-const z-const z-const)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Computing in 3d\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) 1)) (if (= dimensions -2) ;cylindricals - must make sure that the volume has only r >= 0 (let* ((3-sides? (if (<= (vector3-x min-corner) 0) true false)) ;volume passes through the origin (s (if 3-sides? (modround n 3) (modround n 4))) (nr (if 3-sides? (/ (- n s) 3) (/ (- n s) 4))) ;reduced index (ms (get-src-index nr)) ;extract out both m-phi and m-dct (m-phi (first ms)) (m-dct (second ms)) (DR (if 3-sides? (/ 1 resolution) 0)) ;cannot include r = 0!! (sr (- (vector3-x max-corner) (+ (max 0 (vector3-x min-corner)) DR))) (r-cen (+ (* 0.5 sr) (max 0 (vector3-x min-corner)) DR)) (new-center-vec (vector3 r-cen 0 (vector3-z center-vec))) (r-shift (vector3 (/ sr 2) 0 0)) (z-shift (vector3 0 0 (/ sz 2))) (r-const-size (vector3 0 0 sz)) (z-const-size (vector3 sr 0 0)) (center-list ;if 3-sides? = true, only first 3 list elements are used (list (vector3- new-center-vec z-shift) (vector3+ new-center-vec z-shift) (vector3+ new-center-vec r-shift) (vector3- new-center-vec r-shift))) (m-list (list (vector3 m-dct m-phi 0) (vector3 m-dct m-phi 0) (vector3 0 m-phi m-dct) (vector3 0 m-phi m-dct))) (orientation-list (list -1 1 1 -1)) (size-list (list z-const-size z-const-size r-const-size r-const-size)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Computing in Cylindrical coordinates: m-phi = "m-phi", m-dct = "m-dct", 3-sides? = "3-sides?"\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) (if (or (= s 0) (= s 1)) 1 0))) (let* ((s (modround n 4)) ;2d or quasi-3d cartesian: n = 4m + s, no ambiguity in m (m (/ (- n s) 4)) (x-const-size (vector3 0 sy )) ;sz may be non-zero for quasi-3d systems (y-const-size (vector3 sx 0 )) (center-list (list (vector3- center-vec xshift) (vector3+ center-vec xshift) (vector3- center-vec yshift) (vector3+ center-vec yshift))) (m-list (list (vector3 0 m 0) (vector3 0 m 0) (vector3 m 0 0) (vector3 m 0 0))) (orientation-list (list -1 1 -1 1)) (size-list (list x-const-size x-const-size y-const-size y-const-size)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Casimir.scm: working in 2 dimensions\n") (print " Surface center: "(list-ref center-list s)"\n") (print " Surface size: "(list-ref size-list s)"\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) 1)))))) ;compute the casimir force for a single n and single polarization ;n contains both the side number and the harmonic expansion index (define (casimir-force-contrib force-direction integration-vol n Sigma T source-component gt . step-funcs) (define (cos-func X mx my mz source-vol) (let* ((min-corner (meep-volume-get-min-corner source-vol)) (max-corner (meep-volume-get-max-corner source-vol)) (size-vec (vector3- max-corner min-corner)) (X-start (vector3+ X (vector3-scale 0.5 size-vec))) (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (x (vector3-x X-start)) (y (vector3-y X-start)) (z (vector3-z X-start)) (kx (if (> sx 1e-15) (/ (* mx pi) sx) 0)) (ky (if (> sy 1e-15) (/ (* my pi) sy) 0)) (kz (if (> sz 1e-15) (/ (* mz pi) sz) 0)) (Nx (if (> sx 1e-15) (/ (if (= mx 0) 1 2) sx) 1)) (Ny (if (> sy 1e-15) (/ (if (= my 0) 1 2) sy) 1)) (Nz (if (> sz 1e-15) (/ (if (= mz 0) 1 2) sz) 1))) (* (sqrt (* Nx Ny Nz)) (cos (* kx x)) (cos (* ky y)) (cos (* kz z))))) (let* ((ft (meep-type source-component)) (source-info (casimir-source-info integration-vol n)) (source-vol (first source-info)) (mx (second source-info)) (my (third source-info)) ;m-phi in cylindrical coordinates (mz (fourth source-info)) (source-orientation (fifth source-info)) (dt (/ Courant resolution))) (if (= ft E-stuff) (begin (set! global-D-conductivity Sigma) (set! global-B-conductivity 0)) (begin (set! global-B-conductivity Sigma) (set! global-D-conductivity 0))) (if (eq? dimensions -2) (begin (print "Cylindricals: m = "my" and (nr nz) = ("mx", "mz")\n") (print " surface center = "(meep-volume-center source-vol)"\n") (print " source size = "(vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (set! m my))) ;set exp(i m phi) field dependence (set! sources (list (make source (src (make custom-src ; delta function pulse (src-func (lambda (t) (/ 1 dt))) (start-time (* -0.25 dt)) (end-time (* 0.75 dt)) (is-integrated? false))) (center (meep-volume-center source-vol)) (size (vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (component source-component) (amp-func (lambda (p) (cos-func p mx my mz source-vol)))))) (reset-meep) (init-fields) (let* ((counter 0) (force-integral 0)) (define (integrate-function) (let* ((f-temp (meep-fields-casimir-stress-dct-integral fields force-direction (meep-component-direction source-component) mx (if (eq? dimensions -2) 0 my) mz ft source-vol))) (set! force-integral (+ force-integral (imag-part (* (list-ref gt counter) dt source-orientation (if (eq? dimensions -2) (* (if (eq? my 0) 1 2) (real-part f-temp)) f-temp))))) (set! counter (+ counter 1)))) (apply run-until (cons (- T 1) (cons integrate-function step-funcs))) force-integral))) ;%%%%%%%%%%%%%%%%%%%%% BLOCH PBCS %%%%%%%%%%%%%%%%%%%%%% ;here the source is specified in ;the form exp(i k x), k = pi/L (m + k_red), ;m = (mx,my,mz) are integers (reciprocal lattice vectors ;k_red = (kx,ky,kz) is in the 1st BZ, m an integer ;source-vol is assumed to occupy one entire plane intersecting ;the computational cell, so we don't need to extract out ;its information - there is only one side to it ;pass the vector (mx my mz) and (kx ky kz) ready-made, since ;this surface consists of only one face (define (casimir-force-contrib-bloch force-direction source-vol k-vec Sigma T source-component gt . step-funcs) ;sources of the form exp(i g x); surface integration in ;casimir.cpp integrates against exp(-i g x) (define (casimir-bloch-func X gx gy gz source-vol) (let* ((min-corner (meep-volume-get-min-corner source-vol)) (max-corner (meep-volume-get-max-corner source-vol)) (size-vec (vector3- max-corner min-corner)) ;crossection of computational cell (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (x (vector3-x X)) (y (vector3-y X)) (z (vector3-z X)) (Kx (if (> sx 1e-15) (/ (* gx pi) 1) 0)) ;phase winding is independent of unit cell size (Ky (if (> sy 1e-15) (/ (* gy pi) 1) 0)) (Kz (if (> sz 1e-15) (/ (* gz pi) 1) 0)) (Nx (if (> sx 1e-15) (/ sx) 1)) (Ny (if (> sy 1e-15) (/ sy) 1)) (Nz (if (> sz 1e-15) (/ sz) 1))) (* (sqrt (* Nx Ny Nz)) (exp (* (sqrt -1) (+ (* Kx x) (* Ky y) (* Kz z))))))) (let* ((ft (meep-type source-component)) (dt (/ Courant resolution)) ;Bloch phases - exp( i * (2*pi*m + pi*k) x/L) (gx (vector3-x k-vec)) (gy (vector3-y k-vec)) (gz (vector3-z k-vec))) (set! force-complex-fields? true) (set! k-point (vector3-scale 0.5 k-vec)) (if (= ft E-stuff) (begin (set! global-D-conductivity Sigma) (set! global-B-conductivity 0)) (begin (set! global-D-conductivity 0) (set! global-B-conductivity Sigma))) (set! sources (list (make source (src (make custom-src (src-func (lambda (t) (/ 1 dt))) (start-time (* -0.25 dt)) (end-time (* 0.75 dt)) (is-integrated? false))) (center (meep-volume-center source-vol)) (size (vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (component source-component) (amp-func (lambda (p) (casimir-bloch-func p gx gy gz source-vol)))))) (reset-meep) (init-fields) (let* ((counter 0) (force-integral 0)) (define (integrate-function) (set! force-integral (+ force-integral (imag-part (* (list-ref gt counter) dt (meep-fields-casimir-stress-dct-integral fields force-direction (meep-component-direction source-component) gx gy gz ft source-vol true))))) (set! counter (+ counter 1))) (apply run-until (cons (- T 1) (cons integrate-function step-funcs))) force-integral))) meep-1.3/libctl/meep-enums.scm0000644000175400001440000000542012506540666013267 00000000000000; AUTOMATICALLY GENERATED -- DO NOT EDIT (define Incoming (meep-in-or-out-Incoming)) (define Outgoing (meep-in-or-out-Outgoing)) (define CONNECT-PHASE (meep-connect-phase-CONNECT-PHASE)) (define CONNECT-NEGATE (meep-connect-phase-CONNECT-NEGATE)) (define CONNECT-COPY (meep-connect-phase-CONNECT-COPY)) (define Periodic (meep-boundary-condition-Periodic)) (define Metallic (meep-boundary-condition-Metallic)) (define Magnetic (meep-boundary-condition-Magnetic)) (define None (meep-boundary-condition-None)) (define Connecting (meep-time-sink-Connecting)) (define Stepping (meep-time-sink-Stepping)) (define Boundaries (meep-time-sink-Boundaries)) (define MpiTime (meep-time-sink-MpiTime)) (define FieldOutput (meep-time-sink-FieldOutput)) (define FourierTransforming (meep-time-sink-FourierTransforming)) (define Other (meep-time-sink-Other)) (define XY (meep-grace-type-XY)) (define ERROR-BARS (meep-grace-type-ERROR-BARS)) (define Ex (meep-component-Ex)) (define Ey (meep-component-Ey)) (define Er (meep-component-Er)) (define Ep (meep-component-Ep)) (define Ez (meep-component-Ez)) (define Hx (meep-component-Hx)) (define Hy (meep-component-Hy)) (define Hr (meep-component-Hr)) (define Hp (meep-component-Hp)) (define Hz (meep-component-Hz)) (define Dx (meep-component-Dx)) (define Dy (meep-component-Dy)) (define Dr (meep-component-Dr)) (define Dp (meep-component-Dp)) (define Dz (meep-component-Dz)) (define Bx (meep-component-Bx)) (define By (meep-component-By)) (define Br (meep-component-Br)) (define Bp (meep-component-Bp)) (define Bz (meep-component-Bz)) (define Dielectric (meep-component-Dielectric)) (define Permeability (meep-component-Permeability)) (define Sx (meep-derived-component-Sx)) (define Sy (meep-derived-component-Sy)) (define Sr (meep-derived-component-Sr)) (define Sp (meep-derived-component-Sp)) (define Sz (meep-derived-component-Sz)) (define EnergyDensity (meep-derived-component-EnergyDensity)) (define D-EnergyDensity (meep-derived-component-D-EnergyDensity)) (define H-EnergyDensity (meep-derived-component-H-EnergyDensity)) (define D1 (meep-ndim-D1)) (define D2 (meep-ndim-D2)) (define D3 (meep-ndim-D3)) (define Dcyl (meep-ndim-Dcyl)) (define E-stuff (meep-field-type-E-stuff)) (define H-stuff (meep-field-type-H-stuff)) (define D-stuff (meep-field-type-D-stuff)) (define B-stuff (meep-field-type-B-stuff)) (define PE-stuff (meep-field-type-PE-stuff)) (define PH-stuff (meep-field-type-PH-stuff)) (define WE-stuff (meep-field-type-WE-stuff)) (define WH-stuff (meep-field-type-WH-stuff)) (define High (meep-boundary-side-High)) (define Low (meep-boundary-side-Low)) (define X (meep-direction-X)) (define Y (meep-direction-Y)) (define Z (meep-direction-Z)) (define R (meep-direction-R)) (define P (meep-direction-P)) (define NO-DIRECTION (meep-direction-NO-DIRECTION)) (define Centered Dielectric) meep-1.3/libctl/meep_op_renames.i0000644000175400001440000000120312315326776014015 00000000000000// operators must be explicitly renamed for SWIG to work %rename(meep_symmetry_add) meep::symmetry::operator+; %rename(meep_symmetry_mul) meep::symmetry::operator*; %rename(meep_symmetry_sub) meep::symmetry::operator-; %rename(meep_symmetry_negate) meep::symmetry::operator-(); %rename(meep_symmetry_eq) meep::symmetry::operator==; %rename(meep_symmetry_neq) meep::symmetry::operator!=; %rename(meep_boundary_region_add) meep::boundary_region::operator+; %rename(meep_boundary_region_mul) meep::boundary_region::operator*; %rename(meep_dft_chunk_subeq) meep::dft_chunk::operator-=; %rename(meep_dft_flux_subeq) meep::dft_flux::operator-=; meep-1.3/libctl/meep-ctl-swig.hpp0000644000175400001440000000336212506314611013666 00000000000000// -*- C++ -*- /* These are functions for the libctl front-end which are exported via SWIG. */ #ifndef MEEP_CTL_SWIG_HPP #define MEEP_CTL_SWIG_HPP 1 vector3 vec_to_vector3(const meep::vec &); meep::vec vector3_to_vec(const vector3 v3); void set_dimensions(int dims); meep::structure *make_structure(int dims, vector3 size, vector3 center, double resolution, bool enable_averaging, double subpixel_tol, int subpixel_maxeval, bool ensure_periodicity_p, ctlio::geometric_object_list geometry, ctlio::material_type_list extra_materials, ctlio::material_type default_mat, const char *eps_input_file, ctlio::pml_list pml_layers, ctlio::symmetry_list symmetries, int num_chunks, double Courant, double global_D_conductivity_diag_, double global_B_conductivity_diag_); ctlio::cvector3_list do_harminv(ctlio::cnumber_list vals, double dt, double fmin, double fmax, int maxbands); ctlio::number_list dft_flux_flux(meep::dft_flux *f); ctlio::number_list dft_force_force(meep::dft_force *f); ctlio::number_list dft_ldos_ldos(meep::dft_ldos *f); ctlio::cnumber_list dft_ldos_F(meep::dft_ldos *f); ctlio::cnumber_list dft_ldos_J(meep::dft_ldos *f); ctlio::cnumber_list dft_near2far_farfield(meep::dft_near2far *f, const meep::vec &x); ctlio::cnumber_list make_casimir_g(double T, double dt, double sigma, meep::field_type ft, std::complex (*eps_func)(std::complex omega) = 0, double Tfft = 0); ctlio::cnumber_list make_casimir_g_kz(double T, double dt, double sigma, meep::field_type ft); // wrapper around constructor to fool SWIG meep::volume_list *make_volume_list(const meep::volume &v, int c, std::complex weight, meep::volume_list *next); #endif // MEEP_CTL_SWIG_HPP meep-1.3/libctl/meep_wrap.cxx0000644000175400001440000517125412506540666013231 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.12 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGGUILE #define SWIG_GUILE_INIT_STATIC extern extern "C" { SWIG_GUILE_INIT_STATIC void SWIG_init (void); } #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * guile_scm_run.swg * ----------------------------------------------------------------------------- */ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* In the code below, use guile 2.0 compatible functions where possible. Functions that don't exist in older versions will be mapped to a deprecated equivalent for those versions only */ #if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2) static SCM scm_module_variable (SCM module, SCM sym) { return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F); } #endif #if SCM_MAJOR_VERSION >= 2 // scm_c_define_gsubr takes a different parameter type // depending on the guile version typedef scm_t_subr swig_guile_proc; #else #if SCM_MAJOR_VERSION >= 2 typedef scm_t_subr swig_guile_proc; #else typedef SCM (*swig_guile_proc)(); #endif #endif typedef SCM (*guile_destructor)(SCM); typedef struct swig_guile_clientdata { guile_destructor destroy; SCM goops_class; } swig_guile_clientdata; #if SCM_MAJOR_VERSION <= 2 #define scm_to_utf8_string scm_to_locale_string #define scm_from_utf8_string scm_from_locale_string #endif #define SWIG_scm2str(s) \ SWIG_Guile_scm2newstr(s, NULL) #define SWIG_str02scm(str) \ str ? scm_from_utf8_string(str) : SCM_BOOL_F # define SWIG_malloc(size) \ scm_malloc(size) # define SWIG_free(mem) \ free(mem) #define SWIG_ConvertPtr(s, result, type, flags) \ SWIG_Guile_ConvertPtr(s, result, type, flags) #define SWIG_MustGetPtr(s, type, argnum, flags) \ SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME) #define SWIG_NewPointerObj(ptr, type, owner) \ SWIG_Guile_NewPointerObj((void*)ptr, type, owner) #define SWIG_PointerAddress(object) \ SWIG_Guile_PointerAddress(object) #define SWIG_PointerType(object) \ SWIG_Guile_PointerType(object) #define SWIG_IsPointerOfType(object, type) \ SWIG_Guile_IsPointerOfType(object, type) #define SWIG_IsPointer(object) \ SWIG_Guile_IsPointer(object) #define SWIG_contract_assert(expr, msg) \ if (!(expr)) \ scm_error(scm_from_locale_symbol("swig-contract-assertion-failed"), \ (char *) FUNC_NAME, (char *) msg, \ SCM_EOL, SCM_BOOL_F); else /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) \ SWIG_Guile_ConvertMember(obj, ptr, sz, ty, FUNC_NAME) #define SWIG_NewMemberObj(ptr, sz, type) \ SWIG_Guile_NewMemberObj(ptr, sz, type, FUNC_NAME) /* Runtime API */ static swig_module_info *SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata)); #define SWIG_GetModule(clientdata) SWIG_Guile_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer) SWIGINTERN char * SWIG_Guile_scm2newstr(SCM str, size_t *len) { #define FUNC_NAME "SWIG_Guile_scm2newstr" char *ret; SCM_ASSERT (scm_is_string(str), str, 1, FUNC_NAME); ret = scm_to_utf8_string(str); if (!ret) return NULL; if (len) *len = strlen(ret) - 1; return ret; #undef FUNC_NAME } static int swig_initialized = 0; static scm_t_bits swig_tag = 0; static scm_t_bits swig_collectable_tag = 0; static scm_t_bits swig_destroyed_tag = 0; static scm_t_bits swig_member_function_tag = 0; static SCM swig_make_func = SCM_EOL; static SCM swig_keyword = SCM_EOL; static SCM swig_symbol = SCM_EOL; #define SWIG_Guile_GetSmob(x) \ ( !scm_is_null(x) && SCM_INSTANCEP(x) && scm_is_true(scm_slot_exists_p(x, swig_symbol)) \ ? scm_slot_ref(x, swig_symbol) : (x) ) SWIGINTERN SCM SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner) { if (ptr == NULL) return SCM_EOL; else { SCM smob; swig_guile_clientdata *cdata = (swig_guile_clientdata *) type->clientdata; if (owner) SCM_NEWSMOB2(smob, swig_collectable_tag, ptr, (void *) type); else SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type); if (!cdata || SCM_NULLP(cdata->goops_class) || swig_make_func == SCM_EOL ) { return smob; } else { /* the scm_make() C function only handles the creation of gf, methods and classes (no instances) the (make ...) function is later redefined in goops.scm. So we need to call that Scheme function. */ return scm_apply(swig_make_func, scm_list_3(cdata->goops_class, swig_keyword, smob), SCM_EOL); } } } SWIGINTERN unsigned long SWIG_Guile_PointerAddress(SCM object) { SCM smob = SWIG_Guile_GetSmob(object); if (SCM_NULLP(smob)) return 0; else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { return (unsigned long) (void *) SCM_CELL_WORD_1(smob); } else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object); } SWIGINTERN swig_type_info * SWIG_Guile_PointerType(SCM object) { SCM smob = SWIG_Guile_GetSmob(object); if (SCM_NULLP(smob)) return NULL; else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { return (swig_type_info *) SCM_CELL_WORD_2(smob); } else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object); } SWIGINTERN int SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) { swig_cast_info *cast; swig_type_info *from; SCM smob = SWIG_Guile_GetSmob(s); if (SCM_NULLP(smob)) { *result = NULL; return SWIG_OK; } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { /* we do not accept smobs representing destroyed pointers */ from = (swig_type_info *) SCM_CELL_WORD_2(smob); if (!from) return SWIG_ERROR; if (type) { cast = SWIG_TypeCheckStruct(from, type); if (cast) { int newmemory = 0; *result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ return SWIG_OK; } else { return SWIG_ERROR; } } else { *result = (void *) SCM_CELL_WORD_1(smob); return SWIG_OK; } } return SWIG_ERROR; } SWIGINTERNINLINE void * SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type, int argnum, int flags, const char *func_name) { void *result; int res = SWIG_Guile_ConvertPtr(s, &result, type, flags); if (!SWIG_IsOK(res)) { /* type mismatch */ scm_wrong_type_arg((char *) func_name, argnum, s); } return result; } SWIGINTERNINLINE int SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type) { void *result; if (SWIG_Guile_ConvertPtr(s, &result, type, 0)) { /* type mismatch */ return 0; } else return 1; } SWIGINTERNINLINE int SWIG_Guile_IsPointer (SCM s) { /* module might not be initialized yet, so initialize it */ SWIG_GetModule(0); return SWIG_Guile_IsPointerOfType (s, NULL); } /* Mark a pointer object non-collectable */ SWIGINTERN void SWIG_Guile_MarkPointerNoncollectable(SCM s) { SCM smob = SWIG_Guile_GetSmob(s); if (!SCM_NULLP(smob)) { if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { SCM_SET_CELL_TYPE(smob, swig_tag); } else scm_wrong_type_arg(NULL, 0, s); } } /* Mark a pointer object destroyed */ SWIGINTERN void SWIG_Guile_MarkPointerDestroyed(SCM s) { SCM smob = SWIG_Guile_GetSmob(s); if (!SCM_NULLP(smob)) { if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { SCM_SET_CELL_TYPE(smob, swig_destroyed_tag); } else scm_wrong_type_arg(NULL, 0, s); } } /* Member functions */ SWIGINTERN SCM SWIG_Guile_NewMemberObj(void *ptr, size_t sz, swig_type_info *type, const char *func_name) { SCM smob; void *copy = malloc(sz); memcpy(copy, ptr, sz); SCM_NEWSMOB2(smob, swig_member_function_tag, copy, (void *) type); return smob; } SWIGINTERN int SWIG_Guile_ConvertMember(SCM smob, void *ptr, size_t sz, swig_type_info *type, const char *func_name) { swig_cast_info *cast; swig_type_info *from; if (SCM_SMOB_PREDICATE(swig_member_function_tag, smob)) { from = (swig_type_info *) SCM_CELL_WORD_2(smob); if (!from) return SWIG_ERROR; if (type) { cast = SWIG_TypeCheckStruct(from, type); if (!cast) return SWIG_ERROR; } memcpy(ptr, (void *) SCM_CELL_WORD_1(smob), sz); return SWIG_OK; } return SWIG_ERROR; } /* Init */ SWIGINTERN int print_swig_aux (SCM swig_smob, SCM port, scm_print_state *pstate, const char *attribute) { swig_type_info *type; type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob); if (type) { scm_puts((char *) "#<", port); scm_puts((char *) attribute, port); scm_puts((char *) "swig-pointer ", port); scm_puts((char *) SWIG_TypePrettyName(type), port); scm_puts((char *) " ", port); scm_intprint((long) SCM_CELL_WORD_1(swig_smob), 16, port); scm_puts((char *) ">", port); /* non-zero means success */ return 1; } else { return 0; } } SWIGINTERN int print_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, ""); } SWIGINTERN int print_collectable_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, "collectable-"); } SWIGINTERN int print_destroyed_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, "destroyed-"); } SWIGINTERN int print_member_function_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { swig_type_info *type; type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob); if (type) { scm_puts((char *) "#<", port); scm_puts((char *) "swig-member-function-pointer ", port); scm_puts((char *) SWIG_TypePrettyName(type), port); scm_puts((char *) " >", port); /* non-zero means success */ return 1; } else { return 0; } } SWIGINTERN SCM equalp_swig (SCM A, SCM B) { if (SCM_CELL_WORD_0(A) == SCM_CELL_WORD_0(B) && SCM_CELL_WORD_1(A) == SCM_CELL_WORD_1(B) && SCM_CELL_WORD_2(A) == SCM_CELL_WORD_2(B)) return SCM_BOOL_T; else return SCM_BOOL_F; } SWIGINTERN size_t free_swig(SCM A) { swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A); if (type) { if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy) ((swig_guile_clientdata *)type->clientdata)->destroy(A); } return 0; } SWIGINTERN size_t free_swig_member_function(SCM A) { free((swig_type_info *) SCM_CELL_WORD_1(A)); return 0; } SWIGINTERN int ensure_smob_tag(SCM swig_module, scm_t_bits *tag_variable, const char *smob_name, const char *scheme_variable_name) { SCM variable = scm_module_variable(swig_module, scm_from_locale_symbol(scheme_variable_name)); if (scm_is_false(variable)) { *tag_variable = scm_make_smob_type((char*)scheme_variable_name, 0); scm_c_module_define(swig_module, scheme_variable_name, scm_from_ulong(*tag_variable)); return 1; } else { *tag_variable = scm_to_ulong(SCM_VARIABLE_REF(variable)); return 0; } } SWIGINTERN SCM SWIG_Guile_Init () { static SCM swig_module; if (swig_initialized) return swig_module; swig_initialized = 1; swig_module = scm_c_resolve_module("Swig swigrun"); if (ensure_smob_tag(swig_module, &swig_tag, "swig-pointer", "swig-pointer-tag")) { scm_set_smob_print(swig_tag, print_swig); scm_set_smob_equalp(swig_tag, equalp_swig); } if (ensure_smob_tag(swig_module, &swig_collectable_tag, "collectable-swig-pointer", "collectable-swig-pointer-tag")) { scm_set_smob_print(swig_collectable_tag, print_collectable_swig); scm_set_smob_equalp(swig_collectable_tag, equalp_swig); scm_set_smob_free(swig_collectable_tag, free_swig); } if (ensure_smob_tag(swig_module, &swig_destroyed_tag, "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) { scm_set_smob_print(swig_destroyed_tag, print_destroyed_swig); scm_set_smob_equalp(swig_destroyed_tag, equalp_swig); } if (ensure_smob_tag(swig_module, &swig_member_function_tag, "swig-member-function-pointer", "swig-member-function-pointer-tag")) { scm_set_smob_print(swig_member_function_tag, print_member_function_swig); scm_set_smob_free(swig_member_function_tag, free_swig_member_function); } swig_make_func = scm_permanent_object( scm_variable_ref(scm_c_module_lookup(scm_c_resolve_module("oop goops"), "make"))); swig_keyword = scm_permanent_object(scm_from_locale_keyword((char*) "init-smob")); swig_symbol = scm_permanent_object(scm_from_locale_symbol("swig-smob")); #ifdef SWIG_INIT_RUNTIME_MODULE SWIG_INIT_RUNTIME_MODULE #endif return swig_module; } SWIGINTERN swig_module_info * SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata)) { SCM module; SCM variable; module = SWIG_Guile_Init(); variable = scm_module_variable(module, scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME)); if (scm_is_false(variable)) { return NULL; } else { return (swig_module_info *) scm_to_ulong(SCM_VARIABLE_REF(variable)); } } SWIGINTERN void SWIG_Guile_SetModule(swig_module_info *swig_module) { SCM module; SCM variable; module = SWIG_Guile_Init(); scm_module_define(module, scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME), scm_from_ulong((unsigned long) swig_module)); } SWIGINTERN int SWIG_Guile_GetArgs (SCM *dest, SCM rest, int reqargs, int optargs, const char *procname) { int i; int num_args_passed = 0; for (i = 0; i my_complex_func(meep::vec const &v) { SCM ret = gh_call1(my_complex_func_scm, ctl_convert_vector3_to_scm(vec_to_vector3(v))); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static inline std::complex my_complex_func2(double t, void *f) { SCM ret = gh_call1((SCM) f, ctl_convert_number_to_scm(t)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } typedef struct { SCM func; int nf; } my_field_func_data; static inline std::complex my_field_func(const std::complex *fields, const meep::vec &loc, void *data_) { my_field_func_data *data = (my_field_func_data *) data_; int num_items = data->nf; cnumber *items = new cnumber[num_items]; for (int i = 0; i < num_items; ++i) items[i] = make_cnumber(real(fields[i]), imag(fields[i])); SCM ret = scm_apply_0(data->func, scm_cons(ctl_convert_vector3_to_scm(vec_to_vector3(loc)), make_cnumber_list(num_items, items))); delete[] items; cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func3_scm; static inline std::complex my_complex_func3(std::complex x) { cnumber cx; cx.re = real(x); cx.im = imag(x); SCM ret = gh_call1(my_complex_func3_scm, ctl_convert_cnumber_to_scm(cx)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static int gswig_const_meep_component_Ex = meep::Ex; static int gswig_const_meep_component_Ey = meep::Ey; static int gswig_const_meep_component_Er = meep::Er; static int gswig_const_meep_component_Ep = meep::Ep; static int gswig_const_meep_component_Ez = meep::Ez; static int gswig_const_meep_component_Hx = meep::Hx; static int gswig_const_meep_component_Hy = meep::Hy; static int gswig_const_meep_component_Hr = meep::Hr; static int gswig_const_meep_component_Hp = meep::Hp; static int gswig_const_meep_component_Hz = meep::Hz; static int gswig_const_meep_component_Dx = meep::Dx; static int gswig_const_meep_component_Dy = meep::Dy; static int gswig_const_meep_component_Dr = meep::Dr; static int gswig_const_meep_component_Dp = meep::Dp; static int gswig_const_meep_component_Dz = meep::Dz; static int gswig_const_meep_component_Bx = meep::Bx; static int gswig_const_meep_component_By = meep::By; static int gswig_const_meep_component_Br = meep::Br; static int gswig_const_meep_component_Bp = meep::Bp; static int gswig_const_meep_component_Bz = meep::Bz; static int gswig_const_meep_component_Dielectric = meep::Dielectric; static int gswig_const_meep_component_Permeability = meep::Permeability; static int gswig_const_meep_derived_component_Sx = meep::Sx; static int gswig_const_meep_derived_component_Sy = meep::Sy; static int gswig_const_meep_derived_component_Sr = meep::Sr; static int gswig_const_meep_derived_component_Sp = meep::Sp; static int gswig_const_meep_derived_component_Sz = meep::Sz; static int gswig_const_meep_derived_component_EnergyDensity = meep::EnergyDensity; static int gswig_const_meep_derived_component_D_EnergyDensity = meep::D_EnergyDensity; static int gswig_const_meep_derived_component_H_EnergyDensity = meep::H_EnergyDensity; static int gswig_const_meep_ndim_D1 = meep::D1; static int gswig_const_meep_ndim_D2 = meep::D2; static int gswig_const_meep_ndim_D3 = meep::D3; static int gswig_const_meep_ndim_Dcyl = meep::Dcyl; static int gswig_const_meep_field_type_E_stuff = meep::E_stuff; static int gswig_const_meep_field_type_H_stuff = meep::H_stuff; static int gswig_const_meep_field_type_D_stuff = meep::D_stuff; static int gswig_const_meep_field_type_B_stuff = meep::B_stuff; static int gswig_const_meep_field_type_PE_stuff = meep::PE_stuff; static int gswig_const_meep_field_type_PH_stuff = meep::PH_stuff; static int gswig_const_meep_field_type_WE_stuff = meep::WE_stuff; static int gswig_const_meep_field_type_WH_stuff = meep::WH_stuff; static int gswig_const_meep_boundary_side_High = meep::High; static int gswig_const_meep_boundary_side_Low = meep::Low; static int gswig_const_meep_direction_X = meep::X; static int gswig_const_meep_direction_Y = meep::Y; static int gswig_const_meep_direction_Z = meep::Z; static int gswig_const_meep_direction_R = meep::R; static int gswig_const_meep_direction_P = meep::P; static int gswig_const_meep_direction_NO_DIRECTION = meep::NO_DIRECTION; static int gswig_const_MEEP_SINGLE = 0; static int gswig_const_meep_h5file_READONLY = meep::h5file::READONLY; static int gswig_const_meep_h5file_READWRITE = meep::h5file::READWRITE; static int gswig_const_meep_h5file_WRITE = meep::h5file::WRITE; static double gswig_const_DEFAULT_SUBPIXEL_TOL = 1e-4; static int gswig_const_DEFAULT_SUBPIXEL_MAXEVAL = 100000; static int gswig_const_meep_boundary_region_NOTHING_SPECIAL = meep::boundary_region::NOTHING_SPECIAL; static int gswig_const_meep_boundary_region_PML = meep::boundary_region::PML; static int gswig_const_meep_in_or_out_Incoming = meep::Incoming; static int gswig_const_meep_in_or_out_Outgoing = meep::Outgoing; static int gswig_const_meep_connect_phase_CONNECT_PHASE = meep::CONNECT_PHASE; static int gswig_const_meep_connect_phase_CONNECT_NEGATE = meep::CONNECT_NEGATE; static int gswig_const_meep_connect_phase_CONNECT_COPY = meep::CONNECT_COPY; static int gswig_const_meep_boundary_condition_Periodic = meep::Periodic; static int gswig_const_meep_boundary_condition_Metallic = meep::Metallic; static int gswig_const_meep_boundary_condition_Magnetic = meep::Magnetic; static int gswig_const_meep_boundary_condition_None = meep::None; static int gswig_const_meep_time_sink_Connecting = meep::Connecting; static int gswig_const_meep_time_sink_Stepping = meep::Stepping; static int gswig_const_meep_time_sink_Boundaries = meep::Boundaries; static int gswig_const_meep_time_sink_MpiTime = meep::MpiTime; static int gswig_const_meep_time_sink_FieldOutput = meep::FieldOutput; static int gswig_const_meep_time_sink_FourierTransforming = meep::FourierTransforming; static int gswig_const_meep_time_sink_Other = meep::Other; static int gswig_const_meep_grace_type_XY = meep::XY; static int gswig_const_meep_grace_type_ERROR_BARS = meep::ERROR_BARS; #include "ctl-io.h" #include "meep-ctl-swig.hpp" static int gswig_const_MEEP_CTL_SWIG_HPP = 1; static SCM _wrap_NUM_FIELD_COMPONENTS(SCM s_0) { #define FUNC_NAME "NUM-FIELD-COMPONENTS" SCM gswig_result; { gswig_result = scm_from_long(meep::NUM_FIELD_COMPONENTS); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_NUM_FIELD_TYPES(SCM s_0) { #define FUNC_NAME "NUM-FIELD-TYPES" SCM gswig_result; { gswig_result = scm_from_long(meep::NUM_FIELD_TYPES); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ex(SCM s_0) { #define FUNC_NAME "meep-component-Ex" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Ex); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ey(SCM s_0) { #define FUNC_NAME "meep-component-Ey" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Ey); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Er(SCM s_0) { #define FUNC_NAME "meep-component-Er" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Er); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ep(SCM s_0) { #define FUNC_NAME "meep-component-Ep" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Ep); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ez(SCM s_0) { #define FUNC_NAME "meep-component-Ez" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Ez); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hx(SCM s_0) { #define FUNC_NAME "meep-component-Hx" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Hx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hy(SCM s_0) { #define FUNC_NAME "meep-component-Hy" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Hy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hr(SCM s_0) { #define FUNC_NAME "meep-component-Hr" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Hr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hp(SCM s_0) { #define FUNC_NAME "meep-component-Hp" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Hp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hz(SCM s_0) { #define FUNC_NAME "meep-component-Hz" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Hz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dx(SCM s_0) { #define FUNC_NAME "meep-component-Dx" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dy(SCM s_0) { #define FUNC_NAME "meep-component-Dy" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dr(SCM s_0) { #define FUNC_NAME "meep-component-Dr" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dp(SCM s_0) { #define FUNC_NAME "meep-component-Dp" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dz(SCM s_0) { #define FUNC_NAME "meep-component-Dz" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bx(SCM s_0) { #define FUNC_NAME "meep-component-Bx" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Bx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_By(SCM s_0) { #define FUNC_NAME "meep-component-By" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_By); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Br(SCM s_0) { #define FUNC_NAME "meep-component-Br" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Br); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bp(SCM s_0) { #define FUNC_NAME "meep-component-Bp" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Bp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bz(SCM s_0) { #define FUNC_NAME "meep-component-Bz" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Bz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dielectric(SCM s_0) { #define FUNC_NAME "meep-component-Dielectric" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Dielectric); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Permeability(SCM s_0) { #define FUNC_NAME "meep-component-Permeability" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_component_Permeability); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sx(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sx" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_Sx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sy(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sy" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_Sy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sr(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sr" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_Sr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sp(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sp" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_Sp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sz(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sz" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_Sz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-EnergyDensity" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_D_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-D-EnergyDensity" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_D_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_H_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-H-EnergyDensity" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_derived_component_H_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D1(SCM s_0) { #define FUNC_NAME "meep-ndim-D1" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_ndim_D1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D2(SCM s_0) { #define FUNC_NAME "meep-ndim-D2" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_ndim_D2); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D3(SCM s_0) { #define FUNC_NAME "meep-ndim-D3" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_ndim_D3); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_Dcyl(SCM s_0) { #define FUNC_NAME "meep-ndim-Dcyl" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_ndim_Dcyl); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_E_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-E-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_E_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_H_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-H-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_H_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_D_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-D-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_D_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_B_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-B-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_B_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_PE_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-PE-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_PE_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_PH_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-PH-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_PH_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_WE_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-WE-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_WE_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_WH_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-WH-stuff" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_field_type_WH_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_side_High(SCM s_0) { #define FUNC_NAME "meep-boundary-side-High" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_side_High); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_side_Low(SCM s_0) { #define FUNC_NAME "meep-boundary-side-Low" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_side_Low); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_X(SCM s_0) { #define FUNC_NAME "meep-direction-X" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_X); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_Y(SCM s_0) { #define FUNC_NAME "meep-direction-Y" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_Y); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_Z(SCM s_0) { #define FUNC_NAME "meep-direction-Z" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_Z); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_R(SCM s_0) { #define FUNC_NAME "meep-direction-R" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_R); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_P(SCM s_0) { #define FUNC_NAME "meep-direction-P" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_P); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_NO_DIRECTION(SCM s_0) { #define FUNC_NAME "meep-direction-NO-DIRECTION" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_direction_NO_DIRECTION); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; bool arg2 ; std::complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_to_int(argv[0]); } { arg2 = (bool) scm_is_true(argv[1]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_to_int(argv[0]); } { arg2 = (bool) scm_is_true(argv[1]); } result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_to_int(argv[0]); } result = (meep::signed_direction *)new meep::signed_direction(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; result = (meep::signed_direction *)new meep::signed_direction(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::signed_direction *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (meep::signed_direction *)new meep::signed_direction((meep::signed_direction const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction(SCM rest) { #define FUNC_NAME "new-signed-direction" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-signed-direction"); if (argc == 0) { return _wrap_new_signed_direction__SWIG_3(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__signed_direction, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_signed_direction__SWIG_4(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_new_signed_direction__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_new_signed_direction__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_new_signed_direction__SWIG_0(argc,argv); } } } } scm_misc_error("new-signed-direction", "No matching method for generic function `new_signed_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_signed_direction_d_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-d-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } if (arg1) (arg1)->d = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_d_get (SCM s_0) { #define FUNC_NAME "signed-direction-d-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (meep::direction) ((arg1)->d); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_flipped_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-flipped-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } if (arg1) (arg1)->flipped = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_flipped_get (SCM s_0) { #define FUNC_NAME "signed-direction-flipped-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (bool) ((arg1)->flipped); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_phase_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-phase-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->phase = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_phase_get (SCM s_0) { #define FUNC_NAME "signed-direction-phase-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = ((arg1)->phase); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_signed_direction (SCM s_0) { #define FUNC_NAME "delete-signed-direction" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_number_of_directions (SCM s_0) { #define FUNC_NAME "meep-number-of-directions" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = (int)meep::number_of_directions(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_start_at_direction (SCM s_0) { #define FUNC_NAME "meep-start-at-direction" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = (meep::direction)meep::start_at_direction(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_stop_at_direction (SCM s_0) { #define FUNC_NAME "meep-stop-at-direction" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = (meep::direction)meep::stop_at_direction(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_first_field_component (SCM s_0) { #define FUNC_NAME "meep-first-field-component" meep::field_type arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::field_type) scm_to_int(s_0); } result = (meep::component)meep::first_field_component(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flip (SCM s_0) { #define FUNC_NAME "meep-flip" meep::signed_direction arg1 ; meep::signed_direction *argp1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction result; { argp1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); arg1 = *argp1; } result = meep::flip(arg1); { meep::signed_direction * resultptr; resultptr = new meep::signed_direction((const meep::signed_direction &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_has_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-has-direction" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (bool)meep::has_direction(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_has_field_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-has-field-direction" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (bool)meep::has_field_direction(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_to_int(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_tm (SCM s_0) { #define FUNC_NAME "meep-is-tm" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_to_int(s_0); } result = (bool)meep::is_tm(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_abort (SCM s_0) { #define FUNC_NAME "meep-abort" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::abort((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_electric (SCM s_0) { #define FUNC_NAME "meep-is-electric" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_to_int(s_0); } result = (bool)meep::is_electric(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_magnetic (SCM s_0) { #define FUNC_NAME "meep-is-magnetic" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_to_int(s_0); } result = (bool)meep::is_magnetic(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_D (SCM s_0) { #define FUNC_NAME "meep-is-D" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_to_int(s_0); } result = (bool)meep::is_D(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_B (SCM s_0) { #define FUNC_NAME "meep-is-B" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_to_int(s_0); } result = (bool)meep::is_B(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_derived (SCM s_0) { #define FUNC_NAME "meep-is-derived" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (int) scm_to_int(s_0); } result = (bool)meep::is_derived(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_poynting (SCM s_0) { #define FUNC_NAME "meep-is-poynting" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::derived_component) scm_to_int(s_0); } result = (bool)meep::is_poynting(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_energydensity (SCM s_0) { #define FUNC_NAME "meep-is-energydensity" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::derived_component) scm_to_int(s_0); } result = (bool)meep::is_energydensity(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_type (SCM s_0) { #define FUNC_NAME "meep-type" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::field_type result; { arg1 = (meep::component) scm_to_int(s_0); } result = (meep::field_type)meep::type(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::component) scm_to_int(argv[0]); } result = (char *)meep::component_name(arg1); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::derived_component) scm_to_int(argv[0]); } result = (char *)meep::component_name(arg1); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (int) scm_to_int(argv[0]); } result = (char *)meep::component_name(arg1); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name(SCM rest) { #define FUNC_NAME "meep-component-name" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-component-name"); if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_2(argc,argv); } } scm_misc_error("meep-component-name", "No matching method for generic function `meep_component_name'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_direction_name (SCM s_0) { #define FUNC_NAME "meep-direction-name" meep::direction arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::direction) scm_to_int(s_0); } result = (char *)meep::direction_name(arg1); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dimension_name (SCM s_0) { #define FUNC_NAME "meep-dimension-name" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::ndim) scm_to_int(s_0); } result = (char *)meep::dimension_name(arg1); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_index (SCM s_0) { #define FUNC_NAME "meep-component-index" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::component) scm_to_int(s_0); } result = (int)meep::component_index(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (int) scm_to_int(argv[0]); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" int arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = (int)meep::direction_component(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::component) scm_to_int(argv[0]); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::derived_component) scm_to_int(argv[0]); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction(SCM rest) { #define FUNC_NAME "meep-component-direction" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-component-direction"); if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_2(argc,argv); } } scm_misc_error("meep-component-direction", "No matching method for generic function `meep_component_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" meep::component arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::component) scm_to_int(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = (meep::component)meep::direction_component(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" meep::derived_component arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::derived_component result; { arg1 = (meep::derived_component) scm_to_int(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = (meep::derived_component)meep::direction_component(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component(SCM rest) { #define FUNC_NAME "meep-direction-component" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-direction-component"); if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_2(argc,argv); } } } scm_misc_error("meep-direction-component", "No matching method for generic function `meep_direction_component'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_field_type_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-field-type-component" meep::field_type arg1 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::field_type) scm_to_int(s_0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (meep::component)meep::field_type_component(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_to_int(argv[0]); } { arg2 = (meep::component) scm_to_int(argv[1]); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::derived_component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_to_int(argv[0]); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch(SCM rest) { #define FUNC_NAME "meep-coordinate-mismatch" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-coordinate-mismatch"); if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_2(argc,argv); } } } scm_misc_error("meep-coordinate-mismatch", "No matching method for generic function `meep_coordinate_mismatch'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_cycle_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-cycle-direction" meep::ndim arg1 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = (meep::direction)meep::cycle_direction(arg1,arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_cycle_component (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-cycle-component" meep::ndim arg1 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = (meep::component)meep::cycle_component(arg1,arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_veccyl (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-veccyl" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } result = meep::veccyl(arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_zero_vec (SCM s_0) { #define FUNC_NAME "meep-zero-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = meep::zero_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; result = (meep::vec *)new meep::vec(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::ndim) scm_to_int(argv[0]); } result = (meep::vec *)new meep::vec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" meep::ndim arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::ndim) scm_to_int(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::vec *)new meep::vec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } result = (meep::vec *)new meep::vec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::vec *)new meep::vec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = (meep::vec *)new meep::vec(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec(SCM rest) { #define FUNC_NAME "new-meep-vec" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-vec"); if (argc == 0) { return _wrap_new_meep_vec__SWIG_0(argc,argv); } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_3(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_2(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_5(argc,argv); } } } } scm_misc_error("new-meep-vec", "No matching method for generic function `new_meep_vec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_vec (SCM s_0) { #define FUNC_NAME "delete-meep-vec" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_round_float (SCM s_0) { #define FUNC_NAME "meep-vec-round-float" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = ((meep::vec const *)arg1)->round_float(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vec-dim-set" meep::vec *arg1 = (meep::vec *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::ndim) scm_to_int(s_1); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_dim_get (SCM s_0) { #define FUNC_NAME "meep-vec-dim-get" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_r (SCM s_0) { #define FUNC_NAME "meep-vec-r" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->r(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_x (SCM s_0) { #define FUNC_NAME "meep-vec-x" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->x(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_y (SCM s_0) { #define FUNC_NAME "meep-vec-y" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->y(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_z (SCM s_0) { #define FUNC_NAME "meep-vec-z" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->z(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vec-in-direction" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (double)((meep::vec const *)arg1)->in_direction(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_set_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vec-set-direction" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } (arg1)->set_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_project_to_boundary (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vec-project-to-boundary" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } result = (double)(arg1)->project_to_boundary(arg2,arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_one_vec (SCM s_0) { #define FUNC_NAME "meep-one-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = meep::one_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_abs (SCM s_0) { #define FUNC_NAME "meep-abs" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(s_0)); arg1 = &vec__arg1; result = (double)meep::abs((meep::vec const &)*arg1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_unit_vec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-unit-vec" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = meep::unit_vec(arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-clean-vec" meep::vec *arg1 = 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; { arg2 = (double) scm_to_double(argv[1]); } result = meep::clean_vec((meep::vec const &)*arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-clean-vec" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; result = meep::clean_vec((meep::vec const &)*arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec(SCM rest) { #define FUNC_NAME "meep-clean-vec" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-clean-vec"); if (argc == 1) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { return _wrap_meep_clean_vec__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_clean_vec__SWIG_0(argc,argv); } } } scm_misc_error("meep-clean-vec", "No matching method for generic function `meep_clean_vec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_iveccyl (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-iveccyl" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (int) scm_to_int(s_0); } { arg2 = (int) scm_to_int(s_1); } result = meep::iveccyl(arg1,arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_zero_ivec (SCM s_0) { #define FUNC_NAME "meep-zero-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = meep::zero_ivec(arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_one_ivec (SCM s_0) { #define FUNC_NAME "meep-one-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_to_int(s_0); } result = meep::one_ivec(arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; result = (meep::ivec *)new meep::ivec(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::ndim) scm_to_int(argv[0]); } result = (meep::ivec *)new meep::ivec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" meep::ndim arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::ndim) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } result = (meep::ivec *)new meep::ivec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_to_int(argv[0]); } result = (meep::ivec *)new meep::ivec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } result = (meep::ivec *)new meep::ivec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (meep::ivec *)new meep::ivec(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec(SCM rest) { #define FUNC_NAME "new-meep-ivec" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-ivec"); if (argc == 0) { return _wrap_new_meep_ivec__SWIG_0(argc,argv); } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_3(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_2(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_5(argc,argv); } } } } scm_misc_error("new-meep-ivec", "No matching method for generic function `new_meep_ivec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_ivec (SCM s_0) { #define FUNC_NAME "delete-meep-ivec" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_yucky_val (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-yucky-val" meep::ivec *arg1 = (meep::ivec *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (int) scm_to_int(s_1); } result = (int)((meep::ivec const *)arg1)->yucky_val(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-dim-set" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ndim) scm_to_int(s_1); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_dim_get (SCM s_0) { #define FUNC_NAME "meep-ivec-dim-get" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_r (SCM s_0) { #define FUNC_NAME "meep-ivec-r" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->r(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_x (SCM s_0) { #define FUNC_NAME "meep-ivec-x" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->x(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_y (SCM s_0) { #define FUNC_NAME "meep-ivec-y" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->y(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_z (SCM s_0) { #define FUNC_NAME "meep-ivec-z" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->z(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-in-direction" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (int)((meep::ivec const *)arg1)->in_direction(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_set_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-ivec-set-direction" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } (arg1)->set_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_round_up_to_even (SCM s_0) { #define FUNC_NAME "meep-ivec-round-up-to-even" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = ((meep::ivec const *)arg1)->round_up_to_even(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_unit_ivec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-unit-ivec" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_to_int(s_0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = meep::unit_ivec(arg1,arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-max" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = meep::max((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_min__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-min" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = meep::min((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-max" meep::ivec *arg1 = 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = meep::max((meep::ivec const &)*arg1,(meep::ivec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max(SCM rest) { #define FUNC_NAME "meep-max" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-max"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_max__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_max__SWIG_0(argc,argv); } } } scm_misc_error("meep-max", "No matching method for generic function `meep_max'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_min__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-min" meep::ivec *arg1 = 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = meep::min((meep::ivec const &)*arg1,(meep::ivec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_min(SCM rest) { #define FUNC_NAME "meep-min" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-min"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_min__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_min__SWIG_0(argc,argv); } } } scm_misc_error("meep-min", "No matching method for generic function `meep_min'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" meep::ivec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } result = meep::max_to_all((meep::ivec const &)*arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-dim-set" meep::volume *arg1 = (meep::volume *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::ndim) scm_to_int(s_1); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_dim_get (SCM s_0) { #define FUNC_NAME "meep-volume-dim-get" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::ndim) scm_to_int(argv[0]); } result = (meep::volume *)new meep::volume(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (meep::volume *)new meep::volume((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; result = (meep::volume *)new meep::volume((meep::vec const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume(SCM rest) { #define FUNC_NAME "new-meep-volume" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-meep-volume"); if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_new_meep_volume__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { return _wrap_new_meep_volume__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_new_meep_volume__SWIG_1(argc,argv); } } } scm_misc_error("new-meep-volume", "No matching method for generic function `new_meep_volume'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_volume_set_direction_min (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volume-set-direction-min" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } (arg1)->set_direction_min(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_set_direction_max (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volume-set-direction-max" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } (arg1)->set_direction_max(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction_min (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction-min" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (double)((meep::volume const *)arg1)->in_direction_min(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction_max (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction-max" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (double)((meep::volume const *)arg1)->in_direction_max(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (double)((meep::volume const *)arg1)->in_direction(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_computational_volume (SCM s_0) { #define FUNC_NAME "meep-volume-computational-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->computational_volume(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_integral_volume (SCM s_0) { #define FUNC_NAME "meep-volume-integral-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->integral_volume(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_full_volume (SCM s_0) { #define FUNC_NAME "meep-volume-full-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->full_volume(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_center (SCM s_0) { #define FUNC_NAME "meep-volume-center" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->center(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_diameter (SCM s_0) { #define FUNC_NAME "meep-volume-diameter" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->diameter(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-volume-contains" meep::volume *arg1 = (meep::volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (bool)((meep::volume const *)arg1)->contains((meep::vec const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-volume-contains" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (bool)((meep::volume const *)arg1)->contains((meep::volume const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains(SCM rest) { #define FUNC_NAME "meep-volume-contains" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-volume-contains"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_volume_contains__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_volume_contains__SWIG_0(argc,argv); } } } scm_misc_error("meep-volume-contains", "No matching method for generic function `meep_volume_contains'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_volume_intersect_with (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-intersect-with" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = ((meep::volume const *)arg1)->intersect_with((meep::volume const &)*arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_round_float (SCM s_0) { #define FUNC_NAME "meep-volume-round-float" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->round_float(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_intersects (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-intersects" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (bool)((meep::volume const *)arg1)->intersects((meep::volume const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_get_min_corner (SCM s_0) { #define FUNC_NAME "meep-volume-get-min-corner" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->get_min_corner(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_get_max_corner (SCM s_0) { #define FUNC_NAME "meep-volume-get-max-corner" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->get_max_corner(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_normal_direction (SCM s_0) { #define FUNC_NAME "meep-volume-normal-direction" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (meep::direction)((meep::volume const *)arg1)->normal_direction(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_volume (SCM s_0) { #define FUNC_NAME "delete-meep-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volcyl (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volcyl" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } result = meep::volcyl(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volone (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volone" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } result = meep::volone(arg1,arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol1d (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vol1d" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } result = meep::vol1d(arg1,arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_voltwo (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-voltwo" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } result = meep::voltwo(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol2d (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vol2d" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } result = meep::vol2d(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol3d (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-vol3d" double arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } result = meep::vol3d(arg1,arg2,arg3,arg4); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grid_volume () { #define FUNC_NAME "new-meep-grid-volume" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; result = (meep::grid_volume *)new meep::grid_volume(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-dim-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ndim) scm_to_int(s_1); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dim_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dim-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-a-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_a_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-a-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_inva_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-inva-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->inva = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_inva_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-inva-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double) ((arg1)->inva); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_print (SCM s_0) { #define FUNC_NAME "meep-grid-volume-print" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } ((meep::grid_volume const *)arg1)->print(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_stride (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-stride" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->stride(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_num_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-num-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->num_direction(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yucky_num (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yucky-num" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->yucky_num(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yucky_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yucky-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(s_1); } result = (meep::direction)((meep::grid_volume const *)arg1)->yucky_direction(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_num_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-set-num-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } (arg1)->set_num_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nr (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nr" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nr(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nx (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nx" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nx(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ny (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ny" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->ny(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nz (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nz" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nz(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_has_field (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-has-field" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)((meep::grid_volume const *)arg1)->has_field(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_has_boundary (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-has-boundary" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (int)((meep::grid_volume const *)arg1)->has_boundary(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dr (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dr" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dr(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dx (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dx" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dx(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dy (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dy" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dy(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dz (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dz" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dz(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ntot (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ntot" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->ntot(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nowned_min (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nowned-min" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nowned_min(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nowned (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-nowned" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->nowned(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_index (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-index" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__ivec, 3, 0); } result = (int)((meep::grid_volume const *)arg1)->index(arg2,(meep::ivec const &)*arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_round_vec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-round-vec" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = ((meep::grid_volume const *)arg1)->round_vec((meep::vec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-interpolate" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; int *arg4 ; double *arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-interpolate" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; meep::ivec *arg4 ; double *arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } { arg5 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate(SCM rest) { #define FUNC_NAME "meep-grid-volume-interpolate" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grid-volume-interpolate"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_interpolate__SWIG_0(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_interpolate__SWIG_1(argc,argv); } } } } } } scm_misc_error("meep-grid-volume-interpolate", "No matching method for generic function `meep_grid_volume_interpolate'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::grid_volume const *)arg1)->dV(arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (double) scm_to_double(argv[2]); } result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV(SCM rest) { #define FUNC_NAME "meep-grid-volume-dV" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-dV"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_0(argc,argv); } } } } scm_misc_error("meep-grid-volume-dV", "No matching method for generic function `meep_grid_volume_dV'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; meep::grid_volume *arg3 = (meep::grid_volume *) 0 ; meep::grid_volume *arg4 = (meep::grid_volume *) 0 ; int *arg5 = (int *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__grid_volume, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4,arg5); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; meep::grid_volume *arg3 = (meep::grid_volume *) 0 ; meep::grid_volume *arg4 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__grid_volume, 4, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; meep::grid_volume *arg3 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with(SCM rest) { #define FUNC_NAME "meep-grid-volume-intersect-with" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grid-volume-intersect-with"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-grid-volume-intersect-with", "No matching method for generic function `meep_grid_volume_intersect_with'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_rmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-rmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->rmin(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_rmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-rmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->rmax(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_xmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-xmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->xmin(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_xmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-xmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->xmax(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ymin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ymin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->ymin(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ymax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ymax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->ymax(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_zmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-zmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->zmin(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_zmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-zmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->zmax(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_center (SCM s_0) { #define FUNC_NAME "meep-grid-volume-center" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->center(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_icenter (SCM s_0) { #define FUNC_NAME "meep-grid-volume-icenter" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->icenter(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_loc (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-loc" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = ((meep::grid_volume const *)arg1)->loc(arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_loc_at_resolution (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-loc-at-resolution" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } result = ((meep::grid_volume const *)arg1)->loc_at_resolution(arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ntot_at_resolution (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-ntot-at-resolution" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_to_double(s_1); } result = (int)((meep::grid_volume const *)arg1)->ntot_at_resolution(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iloc (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-iloc" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = ((meep::grid_volume const *)arg1)->iloc(arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee_index (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yee-index" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->yee_index(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee_shift (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yee-shift" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->yee_shift(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_eps_component (SCM s_0) { #define FUNC_NAME "meep-grid-volume-eps-component" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (meep::component)((meep::grid_volume const *)arg1)->eps_component(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee2cent_offsets (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-grid-volume-yee2cent-offsets" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int *arg3 = 0 ; int *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } ((meep::grid_volume const *)arg1)->yee2cent_offsets(arg2,*arg3,*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_cent2yee_offsets (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-grid-volume-cent2yee-offsets" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int *arg3 = 0 ; int *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } ((meep::grid_volume const *)arg1)->cent2yee_offsets(arg2,*arg3,*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_boundary_location (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-boundary-location" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (double)((meep::grid_volume const *)arg1)->boundary_location(arg2,arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_big_corner (SCM s_0) { #define FUNC_NAME "meep-grid-volume-big-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->big_corner(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_corner (SCM s_0) { #define FUNC_NAME "meep-grid-volume-little-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->little_corner(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_corner (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->corner(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-contains" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (bool)((meep::grid_volume const *)arg1)->contains((meep::vec const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-contains" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->contains((meep::ivec const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains(SCM rest) { #define FUNC_NAME "meep-grid-volume-contains" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grid-volume-contains"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_contains__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_contains__SWIG_0(argc,argv); } } } scm_misc_error("meep-grid-volume-contains", "No matching method for generic function `meep_grid_volume_contains'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_owned_corner0 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-little-owned-corner0" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->little_owned_corner0(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_owned_corner (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-little-owned-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->little_owned_corner(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_owns (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-owns" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->owns((meep::ivec const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_surroundings (SCM s_0) { #define FUNC_NAME "meep-grid-volume-surroundings" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->surroundings(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interior (SCM s_0) { #define FUNC_NAME "meep-grid-volume-interior" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->interior(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_get_boundary_icorners (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-grid-volume-get-boundary-icorners" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; meep::ivec *arg4 = (meep::ivec *) 0 ; meep::ivec *arg5 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } { arg5 = (meep::ivec *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__ivec, 5, 0); } result = (bool)((meep::grid_volume const *)arg1)->get_boundary_icorners(arg2,arg3,arg4,arg5); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-split" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = ((meep::grid_volume const *)arg1)->split(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; meep::grid_volume *arg5 = (meep::grid_volume *) 0 ; double *arg6 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (double *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_double, 6, 0); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4,(meep::grid_volume const *)arg5,arg6); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; meep::grid_volume *arg5 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__grid_volume, 5, 0); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4,(meep::grid_volume const *)arg5); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort(SCM rest) { #define FUNC_NAME "meep-grid-volume-split-by-effort" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-grid-volume-split-by-effort"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-grid-volume-split-by-effort", "No matching method for generic function `meep_grid_volume_split_by_effort'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_at_fraction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-split-at-fraction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; bool arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } { arg3 = (int) scm_to_int(s_2); } result = ((meep::grid_volume const *)arg1)->split_at_fraction(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_halve (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-halve" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->halve(arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad_self (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-pad-self" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } (arg1)->pad_self(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-pad" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = ((meep::grid_volume const *)arg1)->pad(arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-pad" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->pad(); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad(SCM rest) { #define FUNC_NAME "meep-grid-volume-pad" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grid-volume-pad"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_pad__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_pad__SWIG_0(argc,argv); } } } scm_misc_error("meep-grid-volume-pad", "No matching method for generic function `meep_grid_volume_pad'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iyee_shift (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-iyee-shift" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = ((meep::grid_volume const *)arg1)->iyee_shift(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_get_origin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-get-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->get_origin(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->set_origin((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } (arg1)->set_origin((meep::ivec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->shift_origin((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } (arg1)->shift_origin((meep::ivec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } (arg1)->shift_origin(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin(SCM rest) { #define FUNC_NAME "meep-grid-volume-shift-origin" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-shift-origin"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_2(argc,argv); } } } } scm_misc_error("meep-grid-volume-shift-origin", "No matching method for generic function `meep_grid_volume_shift_origin'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } (arg1)->set_origin(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin(SCM rest) { #define FUNC_NAME "meep-grid-volume-set-origin" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-set-origin"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_2(argc,argv); } } } } scm_misc_error("meep-grid-volume-set-origin", "No matching method for generic function `meep_grid_volume_set_origin'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_center_origin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-center-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } (arg1)->center_origin(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-origin-in-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (double)((meep::grid_volume const *)arg1)->origin_in_direction(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iorigin_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-iorigin-in-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (int)((meep::grid_volume const *)arg1)->iorigin_in_direction(arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_r (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-r" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_r(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_x (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-x" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_x(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_y (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-y" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_y(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_z (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-z" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_z(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_grid_volume (SCM s_0) { #define FUNC_NAME "delete-meep-grid-volume" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_identity () { #define FUNC_NAME "meep-identity" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; result = meep::identity(); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_rotate4 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-rotate4" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_to_int(s_0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::rotate4(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_rotate2 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-rotate2" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_to_int(s_0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::rotate2(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_mirror (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-mirror" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_to_int(s_0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::mirror(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_r_to_minus_r_symmetry (SCM s_0) { #define FUNC_NAME "meep-r-to-minus-r-symmetry" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (double) scm_to_double(s_0); } result = meep::r_to_minus_r_symmetry(arg1); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-symmetry" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; result = (meep::symmetry *)new meep::symmetry(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-symmetry" meep::symmetry *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } result = (meep::symmetry *)new meep::symmetry((meep::symmetry const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry(SCM rest) { #define FUNC_NAME "new-meep-symmetry" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "new-meep-symmetry"); if (argc == 0) { return _wrap_new_meep_symmetry__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_symmetry__SWIG_1(argc,argv); } } scm_misc_error("new-meep-symmetry", "No matching method for generic function `new_meep_symmetry'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_symmetry (SCM s_0) { #define FUNC_NAME "delete-meep-symmetry" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->transform(arg2,arg3); { meep::signed_direction * resultptr; resultptr = new meep::signed_direction((const meep::signed_direction &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->transform((meep::ivec const &)*arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::vec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->transform((meep::vec const &)*arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform_unshifted (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-symmetry-transform-unshifted" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (int) scm_to_int(s_2); } result = ((meep::symmetry const *)arg1)->transform_unshifted((meep::ivec const &)*arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::volume *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->transform((meep::volume const &)*arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (meep::component)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::derived_component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::derived_component result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (meep::derived_component)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::derived_component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (int)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform(SCM rest) { #define FUNC_NAME "meep-symmetry-transform" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-symmetry-transform"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_4(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_5(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_2(argc,argv); } } } } scm_misc_error("meep-symmetry-transform", "No matching method for generic function `meep_symmetry_transform'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift(SCM rest) { #define FUNC_NAME "meep-symmetry-phase-shift" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-symmetry-phase-shift"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_2(argc,argv); } } } } scm_misc_error("meep-symmetry-phase-shift", "No matching method for generic function `meep_symmetry_phase_shift'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_multiplicity (SCM s_0) { #define FUNC_NAME "meep-symmetry-multiplicity" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } result = (int)((meep::symmetry const *)arg1)->multiplicity(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_is_primitive (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-is-primitive" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->is_primitive((meep::ivec const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_reduce (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-reduce" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } result = (meep::volume_list *)((meep::symmetry const *)arg1)->reduce((meep::volume_list const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_add (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-add" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = ((meep::symmetry const *)arg1)->operator +((meep::symmetry const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_mul (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-mul" meep::symmetry *arg1 = (meep::symmetry *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } result = ((meep::symmetry const *)arg1)->operator *(arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__symmetry, 2, 0); } result = ((meep::symmetry const *)arg1)->operator -((meep::symmetry const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } result = ((meep::symmetry const *)arg1)->operator -(); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub(SCM rest) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-symmetry-meep-symmetry-sub"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_symmetry_meep_symmetry_sub__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_symmetry_meep_symmetry_sub__SWIG_0(argc,argv); } } } scm_misc_error("meep-symmetry-meep-symmetry-sub", "No matching method for generic function `meep_symmetry_meep_symmetry_sub'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_eq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-eq" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->operator ==((meep::symmetry const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_neq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-neq" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->operator !=((meep::symmetry const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; std::complex< double > arg3 ; meep::volume_list *arg4 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } { arg4 = (meep::volume_list *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume_list, 4, 0); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; std::complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_volume_list (SCM s_0) { #define FUNC_NAME "delete-meep-volume-list" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume_list, 1, 0); } result = (meep::volume_list *)new meep::volume_list((meep::volume_list const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list(SCM rest) { #define FUNC_NAME "new-meep-volume-list" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-volume-list"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_volume_list__SWIG_3(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_new_meep_volume_list__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_new_meep_volume_list__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_volume_list__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-volume-list", "No matching method for generic function `new_meep_volume_list'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_volume_list_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-v-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_v_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-v-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_c_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-c-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->c = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_c_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-c-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (int) ((arg1)->c); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_weight_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-weight-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->weight = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_weight_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-weight-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = ((arg1)->weight); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-next-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_next_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-next-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (meep::volume_list *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_wall_time () { #define FUNC_NAME "meep-wall-time" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; result = (double)meep::wall_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_initialize (SCM s_0, SCM s_1) { #define FUNC_NAME "new-meep-initialize" int *arg1 = 0 ; char ***arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::initialize *result = 0 ; { arg1 = (int *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_int, 1, 0); } { arg2 = (char ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_char, 2, 0); } result = (meep::initialize *)new meep::initialize(*arg1,*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__initialize, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_initialize (SCM s_0) { #define FUNC_NAME "delete-meep-initialize" meep::initialize *arg1 = (meep::initialize *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::initialize *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__initialize, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_initialize_elapsed_time (SCM s_0) { #define FUNC_NAME "meep-initialize-elapsed-time" meep::initialize *arg1 = (meep::initialize *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::initialize *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__initialize, 1, 0); } result = (double)(arg1)->elapsed_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_all_wait () { #define FUNC_NAME "meep-all-wait" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::all_wait(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_count_processors () { #define FUNC_NAME "meep-count-processors" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::count_processors(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_my_rank () { #define FUNC_NAME "meep-my-rank" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::my_rank(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_am_really_master () { #define FUNC_NAME "meep-am-really-master" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; result = (bool)meep::am_really_master(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_am_master () { #define FUNC_NAME "meep-am-master" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::am_master(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-send" int arg1 ; int arg2 ; double *arg3 = (double *) 0 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (int) scm_to_int(argv[3]); } meep::send(arg1,arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-send" int arg1 ; int arg2 ; double *arg3 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } meep::send(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send(SCM rest) { #define FUNC_NAME "meep-send" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-send"); if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_send__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_meep_send__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-send", "No matching method for generic function `meep_send'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; char *arg2 = (char *) 0 ; int arg3 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; std::complex< double > *arg2 = (std::complex< double > *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__complexT_double_t, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (int) scm_to_int(argv[0]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[1]); arg2 = std::complex(cnum.re, cnum.im); } result = meep::broadcast(arg1,arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = (double)meep::broadcast(arg1,arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } result = (int)meep::broadcast(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (bool) scm_is_true(argv[1]); } result = (bool)meep::broadcast(arg1,arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast(SCM rest) { #define FUNC_NAME "meep-broadcast" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-broadcast"); if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_7(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_6(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_5(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[1]); } if (_v) { return _wrap_meep_broadcast__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_1(argc,argv); } } } } scm_misc_error("meep-broadcast", "No matching method for generic function `meep_broadcast'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_max_to_master (SCM s_0) { #define FUNC_NAME "meep-max-to-master" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(s_0); } result = (double)meep::max_to_master(arg1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(argv[0]); } result = (double)meep::max_to_all(arg1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(argv[0]); } result = (int)meep::max_to_all(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all(SCM rest) { #define FUNC_NAME "meep-max-to-all" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-max-to-all"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_max_to_all__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_max_to_all__SWIG_2(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_max_to_all__SWIG_1(argc,argv); } } scm_misc_error("meep-max-to-all", "No matching method for generic function `meep_max_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_sum_to_master__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-master" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(argv[0]); } result = (double)meep::sum_to_master(arg1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(argv[0]); } result = (double)meep::sum_to_all(arg1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" double *arg1 = (double *) 0 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (double *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_double, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_all((double const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_master__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-master" double *arg1 = (double *) 0 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (double *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_double, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_master((double const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" float *arg1 = (float *) 0 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (float *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_float, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_all((float const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" std::complex< float > *arg1 = (std::complex< float > *) 0 ; std::complex< double > *arg2 = (std::complex< double > *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (std::complex< float > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_float_t, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__complexT_double_t, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_all((std::complex< float > const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" std::complex< double > *arg1 = (std::complex< double > *) 0 ; std::complex< double > *arg2 = (std::complex< double > *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__complexT_double_t, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_all((std::complex< double > const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_master__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-master" std::complex< double > *arg1 = (std::complex< double > *) 0 ; std::complex< double > *arg2 = (std::complex< double > *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__complexT_double_t, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::sum_to_master((std::complex< double > const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_master(SCM rest) { #define FUNC_NAME "meep-sum-to-master" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-sum-to-master"); if (argc == 1) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_sum_to_master__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_master__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_master__SWIG_2(argc,argv); } } } } scm_misc_error("meep-sum-to-master", "No matching method for generic function `meep_sum_to_master'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" long double arg1 ; long double *argp1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; long double result; { argp1 = (long double *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_long_double, 1, 0); arg1 = *argp1; } result = (long double)meep::sum_to_all(arg1); { long double * resultptr; resultptr = new long double((const long double &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_long_double, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" std::complex< double > arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } result = meep::sum_to_all(arg1); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" std::complex< long double > arg1 ; std::complex< long double > *argp1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< long double > result; { argp1 = (std::complex< long double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_long_double_t, 1, 0); arg1 = *argp1; } result = meep::sum_to_all(arg1); { std::complex< long double > * resultptr; resultptr = new std::complex< long double >((const std::complex< long double > &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_std__complexT_long_double_t, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(argv[0]); } result = (int)meep::sum_to_all(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all(SCM rest) { #define FUNC_NAME "meep-sum-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-sum-to-all"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_long_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_sum_to_all__SWIG_5(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_long_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_sum_to_all__SWIG_7(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_8(argc,argv); } } if (argc == 1) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { return _wrap_meep_sum_to_all__SWIG_6(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_float, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_float_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_4(argc,argv); } } } } scm_misc_error("meep-sum-to-all", "No matching method for generic function `meep_sum_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_partial_sum_to_all (SCM s_0) { #define FUNC_NAME "meep-partial-sum-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(s_0); } result = (int)meep::partial_sum_to_all(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-or-to-all" bool arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (bool) scm_is_true(argv[0]); } result = (bool)meep::or_to_all(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-or-to-all" int *arg1 = (int *) 0 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_int, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::or_to_all((int const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all(SCM rest) { #define FUNC_NAME "meep-or-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-or-to-all"); if (argc == 1) { int _v; { _v = SCM_BOOLP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_or_to_all__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_or_to_all__SWIG_1(argc,argv); } } } } scm_misc_error("meep-or-to-all", "No matching method for generic function `meep_or_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_and_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-and-to-all" bool arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (bool) scm_is_true(argv[0]); } result = (bool)meep::and_to_all(arg1); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_and_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-and-to-all" int *arg1 = (int *) 0 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_int, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } meep::and_to_all((int const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_and_to_all(SCM rest) { #define FUNC_NAME "meep-and-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-and-to-all"); if (argc == 1) { int _v; { _v = SCM_BOOLP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_and_to_all__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_and_to_all__SWIG_1(argc,argv); } } } } scm_misc_error("meep-and-to-all", "No matching method for generic function `meep_and_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_master_printf (SCM s_0) { #define FUNC_NAME "meep-master-printf" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::master_printf((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_debug_printf (SCM s_0) { #define FUNC_NAME "meep-debug-printf" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::debug_printf((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fprintf (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-master-fprintf" FILE *arg1 = (FILE *) 0 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (FILE *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_FILE, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } meep::master_fprintf(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fopen (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-master-fopen" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; FILE *result = 0 ; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } result = (FILE *)meep::master_fopen((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_FILE, 0); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fclose (SCM s_0) { #define FUNC_NAME "meep-master-fclose" FILE *arg1 = (FILE *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (FILE *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_FILE, 1, 0); } meep::master_fclose(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_begin_critical_section (SCM s_0) { #define FUNC_NAME "meep-begin-critical-section" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(s_0); } meep::begin_critical_section(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_critical_section (SCM s_0) { #define FUNC_NAME "meep-end-critical-section" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(s_0); } meep::end_critical_section(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_divide_parallel_processes (SCM s_0) { #define FUNC_NAME "meep-divide-parallel-processes" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(s_0); } result = (int)meep::divide_parallel_processes(arg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_begin_global_communications () { #define FUNC_NAME "meep-begin-global-communications" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::begin_global_communications(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_global_communications () { #define FUNC_NAME "meep-end-global-communications" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::end_global_communications(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_divide_parallel () { #define FUNC_NAME "meep-end-divide-parallel" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::end_divide_parallel(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_my_global_rank () { #define FUNC_NAME "meep-my-global-rank" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::my_global_rank(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_MEEP_SINGLE(SCM s_0) { #define FUNC_NAME "MEEP-SINGLE" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_MEEP_SINGLE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_quiet(SCM s_0) { #define FUNC_NAME "quiet" SCM gswig_result; if (s_0 != SCM_UNDEFINED) { { meep::quiet = (bool) scm_is_true(s_0); } } { gswig_result = scm_from_bool(meep::quiet); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_pi(SCM s_0) { #define FUNC_NAME "pi" SCM gswig_result; { gswig_result = scm_from_double(meep::pi); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_infinity(SCM s_0) { #define FUNC_NAME "infinity" SCM gswig_result; { gswig_result = scm_from_double(meep::infinity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_nan(SCM s_0) { #define FUNC_NAME "nan" SCM gswig_result; { gswig_result = scm_from_double(meep::nan); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_susceptibility__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-susceptibility" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; result = (meep::susceptibility *)new meep::susceptibility(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_susceptibility__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-susceptibility" meep::susceptibility *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (meep::susceptibility *)new meep::susceptibility((meep::susceptibility const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_susceptibility(SCM rest) { #define FUNC_NAME "new-meep-susceptibility" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "new-meep-susceptibility"); if (argc == 0) { return _wrap_new_meep_susceptibility__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__susceptibility, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_susceptibility__SWIG_1(argc,argv); } } scm_misc_error("new-meep-susceptibility", "No matching method for generic function `new_meep_susceptibility'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_clone (SCM s_0) { #define FUNC_NAME "meep-susceptibility-clone" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (meep::susceptibility *)((meep::susceptibility const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_susceptibility (SCM s_0) { #define FUNC_NAME "delete-meep-susceptibility" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_get_id (SCM s_0) { #define FUNC_NAME "meep-susceptibility-get-id" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (int)((meep::susceptibility const *)arg1)->get_id(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_update_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-susceptibility-update-P" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::realnum *(*arg3)[2] ; double arg4 ; meep::grid_volume *arg5 = 0 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } ((meep::susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_subtract_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-susceptibility-subtract-P" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::field_type arg2 ; meep::realnum *(*arg3)[2] ; void *arg4 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (void *)SWIG_MustGetPtr(s_3, NULL, 4, 0); } ((meep::susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_needs_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-susceptibility-needs-P" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::component arg2 ; int arg3 ; meep::realnum *(*arg4)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } { arg4 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_3, SWIGTYPE_p_a_2__p_double, 4, 0); } result = (bool)((meep::susceptibility const *)arg1)->needs_P(arg2,arg3,(meep::realnum *(*)[2])arg4); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_needs_W_notowned (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-susceptibility-needs-W-notowned" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::component arg2 ; meep::realnum *(*arg3)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } result = (bool)((meep::susceptibility const *)arg1)->needs_W_notowned(arg2,(meep::realnum *(*)[2])arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_needs_W_prev (SCM s_0) { #define FUNC_NAME "meep-susceptibility-needs-W-prev" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (bool)((meep::susceptibility const *)arg1)->needs_W_prev(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_new_internal_data (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-susceptibility-new-internal-data" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::grid_volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__grid_volume, 3, 0); } result = (void *)((meep::susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_delete_internal_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-delete-internal-data" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } ((meep::susceptibility const *)arg1)->delete_internal_data(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_init_internal_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-susceptibility-init-internal-data" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; double arg3 ; meep::grid_volume *arg4 = 0 ; void *arg5 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__grid_volume, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(s_4, NULL, 5, 0); } ((meep::susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_copy_internal_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-copy-internal-data" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } result = (void *)((meep::susceptibility const *)arg1)->copy_internal_data(arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_num_internal_notowned_needed (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-susceptibility-num-internal-notowned-needed" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::component arg2 ; void *arg3 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (void *)SWIG_MustGetPtr(s_2, NULL, 3, 0); } result = (int)((meep::susceptibility const *)arg1)->num_internal_notowned_needed(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_internal_notowned_ptr (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-susceptibility-internal-notowned-ptr" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; int arg2 ; meep::component arg3 ; int arg4 ; void *arg5 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (meep::component) scm_to_int(s_2); } { arg4 = (int) scm_to_int(s_3); } { arg5 = (void *)SWIG_MustGetPtr(s_4, NULL, 5, 0); } result = (meep::realnum *)((meep::susceptibility const *)arg1)->internal_notowned_ptr(arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_num_cinternal_notowned_needed (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-susceptibility-num-cinternal-notowned-needed" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::component arg2 ; void *arg3 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (void *)SWIG_MustGetPtr(s_2, NULL, 3, 0); } result = (int)((meep::susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_cinternal_notowned_ptr (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-susceptibility-cinternal-notowned-ptr" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; int arg2 ; meep::component arg3 ; int arg4 ; int arg5 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (meep::component) scm_to_int(s_2); } { arg4 = (int) scm_to_int(s_3); } { arg5 = (int) scm_to_int(s_4); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } result = (meep::realnum *)((meep::susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-next-set" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::susceptibility *arg2 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::susceptibility *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__susceptibility, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_next_get (SCM s_0) { #define FUNC_NAME "meep-susceptibility-next-get" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (meep::susceptibility *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_ntot_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-ntot-set" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->ntot = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_ntot_get (SCM s_0) { #define FUNC_NAME "meep-susceptibility-ntot-get" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (int) ((arg1)->ntot); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_sigma_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-sigma-set" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->sigma); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_sigma_get (SCM s_0) { #define FUNC_NAME "meep-susceptibility-sigma-get" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->sigma); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_trivial_sigma_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-susceptibility-trivial-sigma-set" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; bool (*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } { arg2 = (bool (*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__bool, 2, 0); } { bool (*inp)[5] = (bool (*)[5])(arg2); bool (*dest)[5] = (bool (*)[5])(arg1->trivial_sigma); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { bool *ip = inp[ii]; bool *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_susceptibility_trivial_sigma_get (SCM s_0) { #define FUNC_NAME "meep-susceptibility-trivial-sigma-get" meep::susceptibility *arg1 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool (*result)[5] = 0 ; { arg1 = (meep::susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__susceptibility, 1, 0); } result = (bool (*)[5])(bool (*)[5]) ((arg1)->trivial_sigma); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__bool, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_lorentzian_susceptibility__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-lorentzian-susceptibility" double arg1 ; double arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::lorentzian_susceptibility *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (bool) scm_is_true(argv[2]); } result = (meep::lorentzian_susceptibility *)new meep::lorentzian_susceptibility(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__lorentzian_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_lorentzian_susceptibility__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-lorentzian-susceptibility" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::lorentzian_susceptibility *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::lorentzian_susceptibility *)new meep::lorentzian_susceptibility(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__lorentzian_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_lorentzian_susceptibility(SCM rest) { #define FUNC_NAME "new-meep-lorentzian-susceptibility" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-lorentzian-susceptibility"); if (argc == 2) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_lorentzian_susceptibility__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_new_meep_lorentzian_susceptibility__SWIG_0(argc,argv); } } } } scm_misc_error("new-meep-lorentzian-susceptibility", "No matching method for generic function `new_meep_lorentzian_susceptibility'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_clone (SCM s_0) { #define FUNC_NAME "meep-lorentzian-susceptibility-clone" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } result = (meep::susceptibility *)((meep::lorentzian_susceptibility const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_lorentzian_susceptibility (SCM s_0) { #define FUNC_NAME "delete-meep-lorentzian-susceptibility" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_update_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-lorentzian-susceptibility-update-P" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::realnum *(*arg3)[2] ; double arg4 ; meep::grid_volume *arg5 = 0 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } ((meep::lorentzian_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_subtract_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-lorentzian-susceptibility-subtract-P" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; meep::field_type arg2 ; meep::realnum *(*arg3)[2] ; void *arg4 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (void *)SWIG_MustGetPtr(s_3, NULL, 4, 0); } ((meep::lorentzian_susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_new_internal_data (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-lorentzian-susceptibility-new-internal-data" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::grid_volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__grid_volume, 3, 0); } result = (void *)((meep::lorentzian_susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_init_internal_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-lorentzian-susceptibility-init-internal-data" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; double arg3 ; meep::grid_volume *arg4 = 0 ; void *arg5 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__grid_volume, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(s_4, NULL, 5, 0); } ((meep::lorentzian_susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_copy_internal_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-lorentzian-susceptibility-copy-internal-data" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } result = (void *)((meep::lorentzian_susceptibility const *)arg1)->copy_internal_data(arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_num_cinternal_notowned_needed (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-lorentzian-susceptibility-num-cinternal-notowned-needed" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; meep::component arg2 ; void *arg3 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (void *)SWIG_MustGetPtr(s_2, NULL, 3, 0); } result = (int)((meep::lorentzian_susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_lorentzian_susceptibility_cinternal_notowned_ptr (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-lorentzian-susceptibility-cinternal-notowned-ptr" meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ; int arg2 ; meep::component arg3 ; int arg4 ; int arg5 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__lorentzian_susceptibility, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (meep::component) scm_to_int(s_2); } { arg4 = (int) scm_to_int(s_3); } { arg5 = (int) scm_to_int(s_4); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } result = (meep::realnum *)((meep::lorentzian_susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_noisy_lorentzian_susceptibility__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-noisy-lorentzian-susceptibility" double arg1 ; double arg2 ; double arg3 ; bool arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::noisy_lorentzian_susceptibility *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (bool) scm_is_true(argv[3]); } result = (meep::noisy_lorentzian_susceptibility *)new meep::noisy_lorentzian_susceptibility(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_noisy_lorentzian_susceptibility__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-noisy-lorentzian-susceptibility" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::noisy_lorentzian_susceptibility *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = (meep::noisy_lorentzian_susceptibility *)new meep::noisy_lorentzian_susceptibility(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_noisy_lorentzian_susceptibility(SCM rest) { #define FUNC_NAME "new-meep-noisy-lorentzian-susceptibility" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-noisy-lorentzian-susceptibility"); if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_noisy_lorentzian_susceptibility__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_new_meep_noisy_lorentzian_susceptibility__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-noisy-lorentzian-susceptibility", "No matching method for generic function `new_meep_noisy_lorentzian_susceptibility'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_noisy_lorentzian_susceptibility_clone (SCM s_0) { #define FUNC_NAME "meep-noisy-lorentzian-susceptibility-clone" meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::noisy_lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 1, 0); } result = (meep::susceptibility *)((meep::noisy_lorentzian_susceptibility const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_noisy_lorentzian_susceptibility_update_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-noisy-lorentzian-susceptibility-update-P" meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::realnum *(*arg3)[2] ; double arg4 ; meep::grid_volume *arg5 = 0 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::noisy_lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } ((meep::noisy_lorentzian_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_noisy_lorentzian_susceptibility (SCM s_0) { #define FUNC_NAME "delete-meep-noisy-lorentzian-susceptibility" meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::noisy_lorentzian_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_multilevel_susceptibility__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-multilevel-susceptibility" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::multilevel_susceptibility *result = 0 ; result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__multilevel_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_multilevel_susceptibility__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-multilevel-susceptibility" int arg1 ; int arg2 ; meep::realnum *arg3 = (meep::realnum *) 0 ; meep::realnum *arg4 = (meep::realnum *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; meep::realnum *arg6 = (meep::realnum *) 0 ; meep::realnum *arg7 = (meep::realnum *) 0 ; meep::realnum *arg8 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::multilevel_susceptibility *result = 0 ; { arg1 = (int) scm_to_int(argv[0]); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (meep::realnum *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::realnum *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_double, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } { arg6 = (meep::realnum *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_double, 6, 0); } { arg7 = (meep::realnum *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_double, 7, 0); } { arg8 = (meep::realnum *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility(arg1,arg2,(meep::realnum const *)arg3,(meep::realnum const *)arg4,(meep::realnum const *)arg5,(meep::realnum const *)arg6,(meep::realnum const *)arg7,(meep::realnum const *)arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__multilevel_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_multilevel_susceptibility__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-multilevel-susceptibility" meep::multilevel_susceptibility *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::multilevel_susceptibility *result = 0 ; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility((meep::multilevel_susceptibility const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__multilevel_susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_multilevel_susceptibility(SCM rest) { #define FUNC_NAME "new-meep-multilevel-susceptibility" SCM argv[8]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 8, "new-meep-multilevel-susceptibility"); if (argc == 0) { return _wrap_new_meep_multilevel_susceptibility__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__multilevel_susceptibility, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_multilevel_susceptibility__SWIG_2(argc,argv); } } if (argc == 8) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_multilevel_susceptibility__SWIG_1(argc,argv); } } } } } } } } } scm_misc_error("new-meep-multilevel-susceptibility", "No matching method for generic function `new_meep_multilevel_susceptibility'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_clone (SCM s_0) { #define FUNC_NAME "meep-multilevel-susceptibility-clone" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } result = (meep::susceptibility *)((meep::multilevel_susceptibility const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_multilevel_susceptibility (SCM s_0) { #define FUNC_NAME "delete-meep-multilevel-susceptibility" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_update_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-multilevel-susceptibility-update-P" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::realnum *(*arg3)[2] ; double arg4 ; meep::grid_volume *arg5 = 0 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } ((meep::multilevel_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_subtract_P (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-multilevel-susceptibility-subtract-P" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::field_type arg2 ; meep::realnum *(*arg3)[2] ; void *arg4 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } { arg4 = (void *)SWIG_MustGetPtr(s_3, NULL, 4, 0); } ((meep::multilevel_susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_new_internal_data (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-multilevel-susceptibility-new-internal-data" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; meep::grid_volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__grid_volume, 3, 0); } result = (void *)((meep::multilevel_susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_init_internal_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-multilevel-susceptibility-init-internal-data" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::realnum *(*arg2)[2] ; double arg3 ; meep::grid_volume *arg4 = 0 ; void *arg5 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__grid_volume, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(s_4, NULL, 5, 0); } ((meep::multilevel_susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_copy_internal_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-multilevel-susceptibility-copy-internal-data" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } result = (void *)((meep::multilevel_susceptibility const *)arg1)->copy_internal_data(arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_delete_internal_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-multilevel-susceptibility-delete-internal-data" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } ((meep::multilevel_susceptibility const *)arg1)->delete_internal_data(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_num_cinternal_notowned_needed (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-multilevel-susceptibility-num-cinternal-notowned-needed" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::component arg2 ; void *arg3 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (void *)SWIG_MustGetPtr(s_2, NULL, 3, 0); } result = (int)((meep::multilevel_susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_cinternal_notowned_ptr (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-multilevel-susceptibility-cinternal-notowned-ptr" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; int arg2 ; meep::component arg3 ; int arg4 ; int arg5 ; void *arg6 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (meep::component) scm_to_int(s_2); } { arg4 = (int) scm_to_int(s_3); } { arg5 = (int) scm_to_int(s_4); } { arg6 = (void *)SWIG_MustGetPtr(s_5, NULL, 6, 0); } result = (meep::realnum *)((meep::multilevel_susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_needs_W_notowned (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-multilevel-susceptibility-needs-W-notowned" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; meep::component arg2 ; meep::realnum *(*arg3)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_2, SWIGTYPE_p_a_2__p_double, 3, 0); } result = (bool)((meep::multilevel_susceptibility const *)arg1)->needs_W_notowned(arg2,(meep::realnum *(*)[2])arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_multilevel_susceptibility_needs_W_prev (SCM s_0) { #define FUNC_NAME "meep-multilevel-susceptibility-needs-W-prev" meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::multilevel_susceptibility *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__multilevel_susceptibility, 1, 0); } result = (bool)((meep::multilevel_susceptibility const *)arg1)->needs_W_prev(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_READONLY(SCM s_0) { #define FUNC_NAME "meep-h5file-READONLY" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_h5file_READONLY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_READWRITE(SCM s_0) { #define FUNC_NAME "meep-h5file-READWRITE" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_h5file_READWRITE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_WRITE(SCM s_0) { #define FUNC_NAME "meep-h5file-WRITE" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_h5file_WRITE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; meep::h5file::access_mode arg2 ; bool arg3 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (meep::h5file::access_mode) scm_to_int(argv[1]); } { arg3 = (bool) scm_is_true(argv[2]); } result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; meep::h5file::access_mode arg2 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (meep::h5file::access_mode) scm_to_int(argv[1]); } result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (meep::h5file *)new meep::h5file((char const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file(SCM rest) { #define FUNC_NAME "new-meep-h5file" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-h5file"); if (argc == 1) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_0(argc,argv); } } } } scm_misc_error("new-meep-h5file", "No matching method for generic function `new_meep_h5file'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_h5file (SCM s_0) { #define FUNC_NAME "delete-meep-h5file" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_ok (SCM s_0) { #define FUNC_NAME "meep-h5file-ok" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } result = (bool)(arg1)->ok(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-read" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } result = (meep::realnum *)(arg1)->read((char const *)arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } { arg6 = (bool) scm_is_true(argv[5]); } (arg1)->write((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } (arg1)->write((char const *)arg2,arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-read" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)(arg1)->read((char const *)arg2); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read(SCM rest) { #define FUNC_NAME "meep-h5file-read" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-h5file-read"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_read__SWIG_1(argc,argv); } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_h5file_read__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-h5file-read", "No matching method for generic function `meep_h5file_read'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->write((char const *)arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write(SCM rest) { #define FUNC_NAME "meep-h5file-write" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-h5file-write"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_write__SWIG_2(argc,argv); } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_h5file_write__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_write__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-h5file-write", "No matching method for generic function `meep_h5file_write'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data(SCM rest) { #define FUNC_NAME "meep-h5file-create-data" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-h5file-create-data"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_h5file_create_data__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_create_data__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_create_data__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-h5file-create-data", "No matching method for generic function `meep_h5file_create_data'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_extend_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-h5file-extend-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int) scm_to_int(s_2); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } (arg1)->extend_data((char const *)arg2,arg3,(int const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_or_extend_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-h5file-create-or-extend-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int) scm_to_int(s_2); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) scm_is_true(s_4); } { arg6 = (bool) scm_is_true(s_5); } (arg1)->create_or_extend_data((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-write-chunk" meep::h5file *arg1 = (meep::h5file *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_double, 5, 0); } (arg1)->write_chunk(arg2,(int const *)arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_done_writing_chunks (SCM s_0) { #define FUNC_NAME "meep-h5file-done-writing-chunks" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->done_writing_chunks(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read_size (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-read-size" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (int) scm_to_int(s_4); } (arg1)->read_size((char const *)arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-read-chunk" meep::h5file *arg1 = (meep::h5file *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_double, 5, 0); } (arg1)->read_chunk(arg2,(int const *)arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_remove (SCM s_0) { #define FUNC_NAME "meep-h5file-remove" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_remove_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-h5file-remove-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->remove_data((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_file_name (SCM s_0) { #define FUNC_NAME "meep-h5file-file-name" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } result = (char *)((meep::h5file const *)arg1)->file_name(); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_prevent_deadlock (SCM s_0) { #define FUNC_NAME "meep-h5file-prevent-deadlock" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->prevent_deadlock(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_DEFAULT_SUBPIXEL_TOL(SCM s_0) { #define FUNC_NAME "DEFAULT-SUBPIXEL-TOL" SCM gswig_result; { gswig_result = scm_from_double(gswig_const_DEFAULT_SUBPIXEL_TOL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_DEFAULT_SUBPIXEL_MAXEVAL(SCM s_0) { #define FUNC_NAME "DEFAULT-SUBPIXEL-MAXEVAL" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_DEFAULT_SUBPIXEL_MAXEVAL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_material_function () { #define FUNC_NAME "new-meep-material-function" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::material_function *result = 0 ; result = (meep::material_function *)new meep::material_function(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__material_function, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_material_function (SCM s_0) { #define FUNC_NAME "delete-meep-material-function" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_set_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-set-volume" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } (arg1)->set_volume((meep::volume const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_unset_volume (SCM s_0) { #define FUNC_NAME "meep-material-function-unset-volume" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } (arg1)->unset_volume(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi1p1 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi1p1" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::field_type arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-eps" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->eps((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_mu (SCM s_0) { #define FUNC_NAME "meep-material-function-has-mu" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } result = (bool)(arg1)->has_mu(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-mu" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->mu((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_conductivity (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-conductivity" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->has_conductivity(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-conductivity" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_normal_vector (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-normal-vector" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::field_type arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (arg1)->normal_vector(arg2,(meep::volume const &)*arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (double) scm_to_double(argv[4]); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row(SCM rest) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-material-function-eff-chi1inv-row"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-material-function-eff-chi1inv-row", "No matching method for generic function `meep_material_function_eff_chi1inv_row'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_material_function_sigma_row (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-material-function-sigma-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (double *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_double, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_chi3 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-chi3" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->has_chi3(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi3" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_chi2 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-chi2" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->has_chi2(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi2" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_simple_material_function (SCM s_0) { #define FUNC_NAME "new-meep-simple-material-function" double (*arg1)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::simple_material_function *result = 0 ; { arg1 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_0, SWIGTYPE_p_f_r_q_const__meep__vec__double, 1, 0); } result = (meep::simple_material_function *)new meep::simple_material_function(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__simple_material_function, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_simple_material_function (SCM s_0) { #define FUNC_NAME "delete-meep-simple-material-function" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi1p1 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi1p1" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::field_type arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-simple-material-function-eps" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->eps((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-simple-material-function-mu" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->mu((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-conductivity" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_sigma_row (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-simple-material-function-sigma-row" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (double *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_double, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi3" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi2" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-a-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_a_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-a-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-Courant-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_Courant_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-Courant-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-dt-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_dt_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-dt-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi3_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi3-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; meep::realnum * *b = (meep::realnum * *) arg1->chi3; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((meep::realnum * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi3_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi3-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum **)(meep::realnum **) ((arg1)->chi3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi2_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi2-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; meep::realnum * *b = (meep::realnum * *) arg1->chi2; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((meep::realnum * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi2_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi2-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum **)(meep::realnum **) ((arg1)->chi2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi1inv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi1inv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->chi1inv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi1inv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi1inv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->chi1inv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_trivial_chi1inv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-trivial-chi1inv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; bool (*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (bool (*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__bool, 2, 0); } { bool (*inp)[5] = (bool (*)[5])(arg2); bool (*dest)[5] = (bool (*)[5])(arg1->trivial_chi1inv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { bool *ip = inp[ii]; bool *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_trivial_chi1inv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-trivial-chi1inv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool (*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (bool (*)[5])(bool (*)[5]) ((arg1)->trivial_chi1inv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__bool, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_conductivity_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-conductivity-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->conductivity); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_conductivity_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-conductivity-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->conductivity); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-condinv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->condinv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-condinv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->condinv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_stale_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-condinv-stale-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } if (arg1) (arg1)->condinv_stale = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_stale_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-condinv-stale-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (bool) ((arg1)->condinv_stale); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sig_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-sig-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; double * *b = (double * *) arg1->sig; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sig_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-sig-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double **)(double **) ((arg1)->sig); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_kap_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-kap-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; double * *b = (double * *) arg1->kap; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_kap_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-kap-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double **)(double **) ((arg1)->kap); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_siginv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-siginv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; double * *b = (double * *) arg1->siginv; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_siginv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-siginv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double **)(double **) ((arg1)->siginv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sigsize_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-sigsize-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; int *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0); } { size_t ii; int *b = (int *) arg1->sigsize; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((int *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sigsize_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-sigsize-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int *)(int *) ((arg1)->sigsize); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-gv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_gv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-gv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-v-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_v_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-v-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chiP_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chiP-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::susceptibility **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::susceptibility **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__susceptibility, 2, 0); } { size_t ii; meep::susceptibility * *b = (meep::susceptibility * *) arg1->chiP; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::susceptibility * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chiP_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chiP-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::susceptibility **)(meep::susceptibility **) ((arg1)->chiP); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__susceptibility, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_refcount_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-refcount-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->refcount = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_refcount_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-refcount-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int) ((arg1)->refcount); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_structure_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-structure-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure-chunk" meep::grid_volume *arg1 = 0 ; meep::volume *arg2 = 0 ; double arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } result = (meep::structure_chunk *)new meep::structure_chunk((meep::grid_volume const &)*arg1,(meep::volume const &)*arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::structure_chunk *)new meep::structure_chunk((meep::structure_chunk const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk(SCM rest) { #define FUNC_NAME "new-meep-structure-chunk" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-structure-chunk"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure_chunk__SWIG_1(argc,argv); } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_new_meep_structure_chunk__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-structure-chunk", "No matching method for generic function `new_meep_structure_chunk'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-structure-chunk-set-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) scm_is_true(s_3); } { arg5 = (double) scm_to_double(s_4); } { arg6 = (int) scm_to_int(s_5); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_has_chi (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-has-chi" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (bool)((meep::structure_chunk const *)arg1)->has_chi(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_has_chisigma (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-has-chisigma" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (bool)((meep::structure_chunk const *)arg1)->has_chisigma(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_has_chi1inv (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-has-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (bool)((meep::structure_chunk const *)arg1)->has_chi1inv(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-conductivity" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_conductivity(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_update_condinv (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-update-condinv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } (arg1)->update_condinv(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-chi3" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi3(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-chi2" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi2(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_use_pml (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7, SCM s_8, SCM s_9) { #define FUNC_NAME "meep-structure-chunk-use-pml" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::direction arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::pml_profile_func arg7 = (meep::pml_profile_func) 0 ; void *arg8 = (void *) 0 ; double arg9 ; double arg10 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (double) scm_to_double(s_4); } { arg6 = (double) scm_to_double(s_5); } { arg7 = (meep::pml_profile_func)SWIG_MustGetPtr(s_6, SWIGTYPE_p_f_double_p_void__double, 7, 0); } { arg8 = (void *)SWIG_MustGetPtr(s_7, NULL, 8, 0); } { arg9 = (double) scm_to_double(s_8); } { arg10 = (double) scm_to_double(s_9); } (arg1)->use_pml(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_add_susceptibility (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-structure-chunk-add-susceptibility" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::material_function *arg2 = 0 ; meep::field_type arg3 ; meep::susceptibility *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::field_type) scm_to_int(s_2); } { arg4 = (meep::susceptibility *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__susceptibility, 4, 0); } (arg1)->add_susceptibility(*arg2,arg3,(meep::susceptibility const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_mix_with (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-mix-with" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } { arg3 = (double) scm_to_double(s_2); } (arg1)->mix_with((meep::structure_chunk const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_n_proc (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-n-proc" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int)((meep::structure_chunk const *)arg1)->n_proc(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_is_mine (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-is-mine" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int)((meep::structure_chunk const *)arg1)->is_mine(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_remove_susceptibilities (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-remove-susceptibilities" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } (arg1)->remove_susceptibilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_get_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-structure-chunk-get-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_get_inveps (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-structure-chunk-get-inveps" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure_chunk const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_max_eps (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-max-eps" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double)((meep::structure_chunk const *)arg1)->max_eps(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml_quadratic_profile (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-pml-quadratic-profile" double arg1 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } result = (double)meep::pml_quadratic_profile(arg1,arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_NOTHING_SPECIAL(SCM s_0) { #define FUNC_NAME "meep-boundary-region-NOTHING-SPECIAL" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_region_NOTHING_SPECIAL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_PML(SCM s_0) { #define FUNC_NAME "meep-boundary-region-PML" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_region_PML); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; result = (meep::boundary_region *)new meep::boundary_region(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region::boundary_region_kind arg1 ; double arg2 ; double arg3 ; double arg4 ; meep::pml_profile_func arg5 = (meep::pml_profile_func) 0 ; void *arg6 = (void *) 0 ; double arg7 ; double arg8 ; meep::direction arg9 ; meep::boundary_side arg10 ; meep::boundary_region *arg11 = (meep::boundary_region *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region::boundary_region_kind) scm_to_int(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (meep::pml_profile_func)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_double_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (double) scm_to_double(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } { arg9 = (meep::direction) scm_to_int(argv[8]); } { arg10 = (meep::boundary_side) scm_to_int(argv[9]); } { arg11 = (meep::boundary_region *)SWIG_MustGetPtr(argv[10], SWIGTYPE_p_meep__boundary_region, 11, 0); } result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region::boundary_region_kind arg1 ; double arg2 ; double arg3 ; double arg4 ; meep::pml_profile_func arg5 = (meep::pml_profile_func) 0 ; void *arg6 = (void *) 0 ; double arg7 ; double arg8 ; meep::direction arg9 ; meep::boundary_side arg10 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region::boundary_region_kind) scm_to_int(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (meep::pml_profile_func)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_double_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (double) scm_to_double(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } { arg9 = (meep::direction) scm_to_int(argv[8]); } { arg10 = (meep::boundary_side) scm_to_int(argv[9]); } result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } result = (meep::boundary_region *)new meep::boundary_region((meep::boundary_region const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region(SCM rest) { #define FUNC_NAME "new-meep-boundary-region" SCM argv[11]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 11, "new-meep-boundary-region"); if (argc == 0) { return _wrap_new_meep_boundary_region__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_boundary_region__SWIG_3(argc,argv); } } if (argc == 10) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_double_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[8])) && scm_is_true(scm_exact_p(argv[8]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[9])) && scm_is_true(scm_exact_p(argv[9]))? 1 : 0; } if (_v) { return _wrap_new_meep_boundary_region__SWIG_2(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_double_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[8])) && scm_is_true(scm_exact_p(argv[8]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[9])) && scm_is_true(scm_exact_p(argv[9]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[10], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_boundary_region__SWIG_1(argc,argv); } } } } } } } } } } } } scm_misc_error("new-meep-boundary-region", "No matching method for generic function `new_meep_boundary_region'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_boundary_region (SCM s_0) { #define FUNC_NAME "delete-meep-boundary-region" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_meep_boundary_region_add (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-meep-boundary-region-add" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::boundary_region *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::boundary_region *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__boundary_region, 2, 0); } result = ((meep::boundary_region const *)arg1)->operator +((meep::boundary_region const &)*arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_meep_boundary_region_mul (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-meep-boundary-region-mul" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (double) scm_to_double(s_1); } result = ((meep::boundary_region const *)arg1)->operator *(arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-boundary-region-apply" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__structure, 2, 0); } ((meep::boundary_region const *)arg1)->apply(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-boundary-region-apply" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; meep::structure_chunk *arg3 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__structure_chunk, 3, 0); } ((meep::boundary_region const *)arg1)->apply((meep::structure const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply(SCM rest) { #define FUNC_NAME "meep-boundary-region-apply" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-boundary-region-apply"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_boundary_region_apply__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_boundary_region_apply__SWIG_1(argc,argv); } } } } scm_misc_error("meep-boundary-region-apply", "No matching method for generic function `meep_boundary_region_apply'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_check_ok (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-check-ok" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = (bool)((meep::boundary_region const *)arg1)->check_ok((meep::grid_volume const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; meep::boundary_side arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::boundary_side) scm_to_int(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } result = meep::pml(arg1,arg2,arg3,arg4,arg5); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; meep::boundary_side arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::boundary_side) scm_to_int(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } result = meep::pml(arg1,arg2,arg3,arg4); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; meep::boundary_side arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::boundary_side) scm_to_int(argv[2]); } result = meep::pml(arg1,arg2,arg3); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } result = meep::pml(arg1,arg2,arg3,arg4); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = meep::pml(arg1,arg2,arg3); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = meep::pml(arg1,arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = meep::pml(arg1,arg2,arg3); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = meep::pml(arg1,arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_to_double(argv[0]); } result = meep::pml(arg1); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml(SCM rest) { #define FUNC_NAME "meep-pml" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-pml"); if (argc == 1) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_8(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_5(argc,argv); } } } if (argc == 2) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_7(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_4(argc,argv); } } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_6(argc,argv); } } } } if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-pml", "No matching method for generic function `meep_pml'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunks-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure_chunk **arg2 = (meep::structure_chunk **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure_chunk **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunks_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunks-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk **result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure_chunk **) ((arg1)->chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-num-chunks-set" meep::structure *arg1 = (meep::structure *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->num_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_chunks_get (SCM s_0) { #define FUNC_NAME "meep-structure-num-chunks-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (int) ((arg1)->num_chunks); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-gv-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_gv_get (SCM s_0) { #define FUNC_NAME "meep-structure-gv-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_user_volume_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-user-volume-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->user_volume = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_user_volume_get (SCM s_0) { #define FUNC_NAME "meep-structure-user-volume-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *)& ((arg1)->user_volume); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-a-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_a_get (SCM s_0) { #define FUNC_NAME "meep-structure-a-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-Courant-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_Courant_get (SCM s_0) { #define FUNC_NAME "meep-structure-Courant-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-dt-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_dt_get (SCM s_0) { #define FUNC_NAME "meep-structure-dt-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-v-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_v_get (SCM s_0) { #define FUNC_NAME "meep-structure-v-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_S_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-S-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::symmetry *arg2 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } if (arg1) (arg1)->S = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_S_get (SCM s_0) { #define FUNC_NAME "meep-structure-S-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::symmetry *)& ((arg1)->S); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-outdir-set" meep::structure *arg1 = (meep::structure *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { if (arg2) { arg1->outdir = (char const *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_outdir_get (SCM s_0) { #define FUNC_NAME "meep-structure-outdir-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_volumes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-effort-volumes-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->effort_volumes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_volumes_get (SCM s_0) { #define FUNC_NAME "meep-structure-effort-volumes-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *) ((arg1)->effort_volumes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-effort-set" meep::structure *arg1 = (meep::structure *) 0 ; double *arg2 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } if (arg1) (arg1)->effort = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_get (SCM s_0) { #define FUNC_NAME "meep-structure-effort-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double *) ((arg1)->effort); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_effort_volumes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-num-effort-volumes-set" meep::structure *arg1 = (meep::structure *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->num_effort_volumes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_effort_volumes_get (SCM s_0) { #define FUNC_NAME "meep-structure-num-effort-volumes-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (int) ((arg1)->num_effort_volumes); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_structure (SCM s_0) { #define FUNC_NAME "delete-meep-structure" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; result = (meep::structure *)new meep::structure(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; double arg8 ; int arg9 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } { arg9 = (int) scm_to_int(argv[8]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; double arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_9 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; double arg8 ; int arg9 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } { arg9 = (int) scm_to_int(argv[8]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_10 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; double arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { arg8 = (double) scm_to_double(argv[7]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_11 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; bool arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_12 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_13 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_14 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_15 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_16 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_17 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure *)new meep::structure((meep::structure const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_18 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::structure *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure *)new meep::structure((meep::structure const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure(SCM rest) { #define FUNC_NAME "new-meep-structure" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "new-meep-structure"); if (argc == 0) { return _wrap_new_meep_structure__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_17(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_18(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_8(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_16(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_15(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_7(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_6(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_14(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_13(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_5(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_4(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_12(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_11(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_3(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_2(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_10(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[8])) && scm_is_true(scm_exact_p(argv[8]))? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_9(argc,argv); } } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[8])) && scm_is_true(scm_exact_p(argv[8]))? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_1(argc,argv); } } } } } } } } } } scm_misc_error("new-meep-structure", "No matching method for generic function `new_meep_structure'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } (arg1)->set_materials(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->set_materials(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->set_materials(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_materials(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials(SCM rest) { #define FUNC_NAME "meep-structure-set-materials" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-materials"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_materials__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-materials", "No matching method for generic function `meep_structure_set_materials'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) scm_is_true(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) scm_is_true(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) scm_is_true(argv[3]); } (arg1)->set_chi1inv(arg2,*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi1inv(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv(SCM rest) { #define FUNC_NAME "meep-structure-set-chi1inv" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-structure-set-chi1inv"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-structure-set-chi1inv", "No matching method for generic function `meep_structure_set_chi1inv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_has_chi (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-has-chi" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } result = (bool)((meep::structure const *)arg1)->has_chi(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } (arg1)->set_epsilon(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->set_epsilon(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->set_epsilon(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_epsilon(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } (arg1)->set_epsilon(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->set_epsilon(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->set_epsilon(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_epsilon(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon(SCM rest) { #define FUNC_NAME "meep-structure-set-epsilon" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-epsilon"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_3(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_7(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_5(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_4(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-epsilon", "No matching method for generic function `meep_structure_set_epsilon'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } (arg1)->set_mu(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->set_mu(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->set_mu(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_mu(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } (arg1)->set_mu(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->set_mu(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->set_mu(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_mu(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu(SCM rest) { #define FUNC_NAME "meep-structure-set-mu" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-mu"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_mu__SWIG_3(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_mu__SWIG_7(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_5(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_4(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-mu", "No matching method for generic function `meep_structure_set_mu'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-conductivity" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_conductivity(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-conductivity" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; double (*arg3)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[2], SWIGTYPE_p_f_r_q_const__meep__vec__double, 3, 0); } (arg1)->set_conductivity(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity(SCM rest) { #define FUNC_NAME "meep-structure-set-conductivity" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-conductivity"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_conductivity__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_conductivity__SWIG_1(argc,argv); } } } } scm_misc_error("meep-structure-set-conductivity", "No matching method for generic function `meep_structure_set_conductivity'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi3(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_chi3(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_chi3(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3(SCM rest) { #define FUNC_NAME "meep-structure-set-chi3" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-chi3"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_0(argc,argv); } } } } scm_misc_error("meep-structure-set-chi3", "No matching method for generic function `meep_structure_set_chi3'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi2(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_chi2(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_chi2(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2(SCM rest) { #define FUNC_NAME "meep-structure-set-chi2" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-chi2"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_0(argc,argv); } } } } scm_misc_error("meep-structure-set-chi2", "No matching method for generic function `meep_structure_set_chi2'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_add_susceptibility__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-susceptibility" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::field_type arg3 ; meep::susceptibility *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::field_type) scm_to_int(argv[2]); } { arg4 = (meep::susceptibility *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__susceptibility, 4, 0); } (arg1)->add_susceptibility(arg2,arg3,(meep::susceptibility const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_susceptibility__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-susceptibility" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; meep::field_type arg3 ; meep::susceptibility *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::field_type) scm_to_int(argv[2]); } { arg4 = (meep::susceptibility *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__susceptibility, 4, 0); } (arg1)->add_susceptibility(*arg2,arg3,(meep::susceptibility const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_susceptibility(SCM rest) { #define FUNC_NAME "meep-structure-add-susceptibility" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-structure-add-susceptibility"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__susceptibility, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_add_susceptibility__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__susceptibility, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_add_susceptibility__SWIG_1(argc,argv); } } } } } scm_misc_error("meep-structure-add-susceptibility", "No matching method for generic function `meep_structure_add_susceptibility'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_remove_susceptibilities (SCM s_0) { #define FUNC_NAME "meep-structure-remove-susceptibilities" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } (arg1)->remove_susceptibilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-set-output-directory" meep::structure *arg1 = (meep::structure *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_mix_with (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-mix-with" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (double) scm_to_double(s_2); } (arg1)->mix_with((meep::structure const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_equal_layout (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-equal-layout" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } result = (bool)((meep::structure const *)arg1)->equal_layout((meep::structure const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_print_layout (SCM s_0) { #define FUNC_NAME "meep-structure-print-layout" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } ((meep::structure const *)arg1)->print_layout(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; result = (double)((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv(SCM rest) { #define FUNC_NAME "meep-structure-get-chi1inv" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-structure-get-chi1inv"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_get_chi1inv__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_structure_get_chi1inv__SWIG_1(argc,argv); } } } } } scm_misc_error("meep-structure-get-chi1inv", "No matching method for generic function `meep_structure_get_chi1inv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-inveps" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-inveps" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; result = (double)((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps(SCM rest) { #define FUNC_NAME "meep-structure-get-inveps" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-structure-get-inveps"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_get_inveps__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_structure_get_inveps__SWIG_1(argc,argv); } } } } } scm_misc_error("meep-structure-get-inveps", "No matching method for generic function `meep_structure_get_inveps'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_get_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-get-eps" meep::structure *arg1 = (meep::structure *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::structure const *)arg1)->get_eps((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-get-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::structure const *)arg1)->get_mu((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_max_eps (SCM s_0) { #define FUNC_NAME "meep-structure-max-eps" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double)((meep::structure const *)arg1)->max_eps(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_integrated_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-is-integrated-set" meep::src_time *arg1 = (meep::src_time *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } if (arg1) (arg1)->is_integrated = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_integrated_get (SCM s_0) { #define FUNC_NAME "meep-src-time-is-integrated-get" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (bool) ((arg1)->is_integrated); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-src-time" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; result = (meep::src_time *)new meep::src_time(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-src-time" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-src-time" meep::src_time *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *)new meep::src_time((meep::src_time const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time(SCM rest) { #define FUNC_NAME "new-meep-src-time" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "new-meep-src-time"); if (argc == 0) { return _wrap_new_meep_src_time__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_src_time__SWIG_1(argc,argv); } } scm_misc_error("new-meep-src-time", "No matching method for generic function `new_meep_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-dipole" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->dipole(); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-current" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->current(); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_update (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-src-time-update" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } (arg1)->update(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-current" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = ((meep::src_time const *)arg1)->current(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current(SCM rest) { #define FUNC_NAME "meep-src-time-current" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-src-time-current"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_current__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_current__SWIG_1(argc,argv); } } } } scm_misc_error("meep-src-time-current", "No matching method for generic function `meep_src_time_current'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-last-time-max" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = (double)(arg1)->last_time_max(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-last-time-max" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } result = (double)(arg1)->last_time_max(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max(SCM rest) { #define FUNC_NAME "meep-src-time-last-time-max" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-src-time-last-time-max"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_last_time_max__SWIG_0(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_last_time_max__SWIG_1(argc,argv); } } } scm_misc_error("meep-src-time-last-time-max", "No matching method for generic function `meep_src_time_last_time_max'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_add_to (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-src-time-add-to" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; meep::src_time **arg3 = (meep::src_time **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } { arg3 = (meep::src_time **)SWIG_MustGetPtr(s_2, SWIGTYPE_p_p_meep__src_time, 3, 0); } result = (meep::src_time *)((meep::src_time const *)arg1)->add_to(arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-next-set" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_next_get (SCM s_0) { #define FUNC_NAME "meep-src-time-next-get" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-dipole" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } result = ((meep::src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole(SCM rest) { #define FUNC_NAME "meep-src-time-dipole" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-src-time-dipole"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_dipole__SWIG_0(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_dipole__SWIG_1(argc,argv); } } } scm_misc_error("meep-src-time-dipole", "No matching method for generic function `meep_src_time_dipole'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-src-time-last-time" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (double)((meep::src_time const *)arg1)->last_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-src-time-clone" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *)((meep::src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-is-equal" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-src-time-frequency" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-set-frequency" meep::src_time *arg1 = (meep::src_time *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_times_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-times-equal" meep::src_time *arg1 = 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)meep::src_times_equal((meep::src_time const &)*arg1,(meep::src_time const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time(SCM rest) { #define FUNC_NAME "new-meep-gaussian-src-time" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-gaussian-src-time"); if (argc == 2) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_0(argc,argv); } } } } if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_2(argc,argv); } } } } } scm_misc_error("new-meep-gaussian-src-time", "No matching method for generic function `new_meep_gaussian_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_gaussian_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-gaussian-src-time" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-dipole" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { arg2 = (double) scm_to_double(s_1); } result = ((meep::gaussian_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-last-time" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = (double)((meep::gaussian_src_time const *)arg1)->last_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-clone" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = (meep::src_time *)((meep::gaussian_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-is-equal" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::gaussian_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-frequency" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = ((meep::gaussian_src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-set-frequency" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" std::complex< double > arg1 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" std::complex< double > arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" std::complex< double > arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" std::complex< double > arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" std::complex< double > arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time(SCM rest) { #define FUNC_NAME "new-meep-continuous-src-time" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "new-meep-continuous-src-time"); if (argc == 1) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_4(argc,argv); } } if (argc == 2) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_0(argc,argv); } } } } } } scm_misc_error("new-meep-continuous-src-time", "No matching method for generic function `new_meep_continuous_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_continuous_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-continuous-src-time" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-dipole" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { arg2 = (double) scm_to_double(s_1); } result = ((meep::continuous_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-last-time" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = (double)((meep::continuous_src_time const *)arg1)->last_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-clone" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = (meep::src_time *)((meep::continuous_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-is-equal" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::continuous_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-frequency" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = ((meep::continuous_src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-set-frequency" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } { arg3 = (double) scm_to_double(argv[1]); } { arg4 = (double) scm_to_double(argv[2]); } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } { arg3 = (double) scm_to_double(argv[1]); } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time(SCM rest) { #define FUNC_NAME "new-meep-custom-src-time" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-custom-src-time"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { if (argc <= 1) { return _wrap_new_meep_custom_src_time__SWIG_2(argc,argv); } return _wrap_new_meep_custom_src_time__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_custom_src_time__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_custom_src_time__SWIG_0(argc,argv); } } } } scm_misc_error("new-meep-custom-src-time", "No matching method for generic function `new_meep_custom_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_custom_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-custom-src-time" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_current (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-custom-src-time-current" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } result = ((meep::custom_src_time const *)arg1)->current(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-custom-src-time-dipole" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (double) scm_to_double(s_1); } result = ((meep::custom_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-custom-src-time-last-time" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } result = (double)((meep::custom_src_time const *)arg1)->last_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-custom-src-time-clone" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } result = (meep::src_time *)((meep::custom_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-custom-src-time-is-equal" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::custom_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_monitor_point () { #define FUNC_NAME "new-meep-monitor-point" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; result = (meep::monitor_point *)new meep::monitor_point(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_monitor_point (SCM s_0) { #define FUNC_NAME "delete-meep-monitor-point" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_loc_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-loc-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->loc = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_loc_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-loc-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (meep::vec *)& ((arg1)->loc); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-t-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_t_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-t-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (double) ((arg1)->t); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_f_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-f-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; std::complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } { size_t ii; std::complex< double > *b = (std::complex< double > *) arg1->f; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((std::complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_f_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-f-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (std::complex< double > *)(std::complex< double > *) ((arg1)->f); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-next-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::monitor_point *arg2 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::monitor_point *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__monitor_point, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_next_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-next-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (meep::monitor_point *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_get_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-get-component" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (arg1)->get_component(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } result = (double)(arg1)->poynting_in_direction(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::vec arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); } result = (double)(arg1)->poynting_in_direction(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction(SCM rest) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-monitor-point-poynting-in-direction"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_poynting_in_direction__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_monitor_point_poynting_in_direction__SWIG_1(argc,argv); } } } scm_misc_error("meep-monitor-point-poynting-in-direction", "No matching method for generic function `meep_monitor_point_poynting_in_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; std::complex< double > **arg3 = (std::complex< double > **) 0 ; std::complex< double > **arg4 = (std::complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; int arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (std::complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_std__complexT_double_t, 3, 0); } { arg4 = (std::complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_std__complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (double) scm_to_double(argv[6]); } { arg8 = (int) scm_to_int(argv[7]); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; std::complex< double > **arg3 = (std::complex< double > **) 0 ; std::complex< double > **arg4 = (std::complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (std::complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_std__complexT_double_t, 3, 0); } { arg4 = (std::complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_std__complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (double) scm_to_double(argv[6]); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; std::complex< double > **arg3 = (std::complex< double > **) 0 ; std::complex< double > **arg4 = (std::complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (std::complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_std__complexT_double_t, 3, 0); } { arg4 = (std::complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_std__complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_to_double(argv[5]); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; std::complex< double > **arg3 = (std::complex< double > **) 0 ; std::complex< double > **arg4 = (std::complex< double > **) 0 ; int *arg5 = (int *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (std::complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_std__complexT_double_t, 3, 0); } { arg4 = (std::complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_std__complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform(SCM rest) { #define FUNC_NAME "meep-monitor-point-fourier-transform" SCM argv[8]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 8, "meep-monitor-point-fourier-transform"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_3(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_2(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_1(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[7])) && scm_is_true(scm_exact_p(argv[7]))? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_0(argc,argv); } } } } } } } } } scm_misc_error("meep-monitor-point-fourier-transform", "No matching method for generic function `meep_monitor_point_fourier_transform'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_harminv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7) { #define FUNC_NAME "meep-monitor-point-harminv" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; std::complex< double > **arg3 = (std::complex< double > **) 0 ; std::complex< double > **arg4 = (std::complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; int arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (std::complex< double > **)SWIG_MustGetPtr(s_2, SWIGTYPE_p_p_std__complexT_double_t, 3, 0); } { arg4 = (std::complex< double > **)SWIG_MustGetPtr(s_3, SWIGTYPE_p_p_std__complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_to_double(s_5); } { arg7 = (double) scm_to_double(s_6); } { arg8 = (int) scm_to_int(s_7); } (arg1)->harminv(arg2,arg3,arg4,arg5,arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7, SCM s_8, SCM s_9, SCM s_10, SCM s_11, SCM s_12, SCM s_13, SCM s_14, SCM s_15, SCM s_16, SCM s_17) { #define FUNC_NAME "new-meep-dft-chunk" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::ivec arg2 ; meep::ivec arg3 ; meep::vec arg4 ; meep::vec arg5 ; meep::vec arg6 ; meep::vec arg7 ; double arg8 ; double arg9 ; std::complex< double > arg10 ; std::complex< double > arg11 ; meep::component arg12 ; bool arg13 ; meep::ivec arg14 ; meep::symmetry *arg15 = 0 ; int arg16 ; int arg17 ; void *arg18 = (void *) 0 ; meep::ivec *argp2 ; meep::ivec *argp3 ; meep::ivec *argp14 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { argp2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); arg2 = *argp2; } { argp3 = (meep::ivec *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__ivec, 3, 0); arg3 = *argp3; } { arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); } { arg5 = vector3_to_vec(ctl_convert_vector3_to_c(s_4)); } { arg6 = vector3_to_vec(ctl_convert_vector3_to_c(s_5)); } { arg7 = vector3_to_vec(ctl_convert_vector3_to_c(s_6)); } { arg8 = (double) scm_to_double(s_7); } { arg9 = (double) scm_to_double(s_8); } { cnumber cnum = ctl_convert_cnumber_to_c(s_9); arg10 = std::complex(cnum.re, cnum.im); } { cnumber cnum = ctl_convert_cnumber_to_c(s_10); arg11 = std::complex(cnum.re, cnum.im); } { arg12 = (meep::component) scm_to_int(s_11); } { arg13 = (bool) scm_is_true(s_12); } { argp14 = (meep::ivec *)SWIG_MustGetPtr(s_13, SWIGTYPE_p_meep__ivec, 14, 0); arg14 = *argp14; } { arg15 = (meep::symmetry *)SWIG_MustGetPtr(s_14, SWIGTYPE_p_meep__symmetry, 15, 0); } { arg16 = (int) scm_to_int(s_15); } { arg17 = (int) scm_to_int(s_16); } { arg18 = (void *)SWIG_MustGetPtr(s_17, NULL, 18, 0); } result = (meep::dft_chunk *)new meep::dft_chunk(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,(meep::symmetry const &)*arg15,arg16,arg17,(void const *)arg18); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_chunk_rest (SCM rest) { SCM arg[18]; SWIG_Guile_GetArgs (arg, rest, 18, 0, "new-meep-dft-chunk"); return _wrap_new_meep_dft_chunk(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9], arg[10], arg[11], arg[12], arg[13], arg[14], arg[15], arg[16], arg[17]); } static SCM _wrap_delete_meep_dft_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-dft-chunk" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_update_dft (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-update-dft" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } (arg1)->update_dft(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_scale_dft (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-scale-dft" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dft(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_meep_dft_chunk_subeq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-meep-dft-chunk-subeq" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } (arg1)->operator -=((meep::dft_chunk const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_omega_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-omega-min-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->omega_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_omega_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-omega-min-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->omega_min); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_domega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-domega-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->domega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_domega_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-domega-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->domega); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_Nomega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-Nomega-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->Nomega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_Nomega_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-Nomega-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->Nomega); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_c_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-c-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } if (arg1) (arg1)->c = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_c_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-c-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::component) ((arg1)->c); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_N_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-N-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->N = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_N_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-N-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->N); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-dft-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; std::complex< meep::realnum > *arg2 = (std::complex< meep::realnum > *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (std::complex< meep::realnum > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } if (arg1) (arg1)->dft = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-dft-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< meep::realnum > *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (std::complex< meep::realnum > *) ((arg1)->dft); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_chunk_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-next-in-chunk-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->next_in_chunk = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_chunk_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-next-in-chunk-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->next_in_chunk); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_dft_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-next-in-dft-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->next_in_dft = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_dft_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-next-in-dft-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->next_in_dft); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_extra_weight_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-extra-weight-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->extra_weight = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_extra_weight_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-extra-weight-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = ((arg1)->extra_weight); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_fc_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-fc-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::fields_chunk *arg2 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::fields_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__fields_chunk, 2, 0); } if (arg1) (arg1)->fc = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_fc_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-fc-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::fields_chunk *) ((arg1)->fc); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_is_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-is-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::ivec *arg2 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } if (arg1) (arg1)->is = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_is_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-is-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::ivec *)& ((arg1)->is); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_ie_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-ie-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::ivec *arg2 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } if (arg1) (arg1)->ie = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_ie_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-ie-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::ivec *)& ((arg1)->ie); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_s0_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-s0-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->s0 = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_s0_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-s0-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::vec *)& ((arg1)->s0); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_s1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-s1-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->s1 = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_s1_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-s1-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::vec *)& ((arg1)->s1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_e0_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-e0-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->e0 = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_e0_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-e0-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::vec *)& ((arg1)->e0); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_e1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-e1-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->e1 = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_e1_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-e1-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::vec *)& ((arg1)->e1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dV0_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-dV0-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dV0 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dV0_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-dV0-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->dV0); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dV1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-dV1-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dV1 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dV1_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-dV1-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->dV1); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_sqrt_dV_and_interp_weights_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-sqrt-dV-and-interp-weights-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } if (arg1) (arg1)->sqrt_dV_and_interp_weights = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_sqrt_dV_and_interp_weights_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-sqrt-dV-and-interp-weights-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (bool) ((arg1)->sqrt_dV_and_interp_weights); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_scale_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-scale-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->scale = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_scale_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-scale-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = ((arg1)->scale); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_shift_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-shift-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::ivec *arg2 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } if (arg1) (arg1)->shift = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_shift_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-shift-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::ivec *)& ((arg1)->shift); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_S_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-S-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::symmetry *arg2 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } if (arg1) (arg1)->S = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_S_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-S-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::symmetry *)& ((arg1)->S); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_sn_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-sn-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->sn = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_sn_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-sn-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->sn); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_phase_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-dft-phase-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; std::complex< meep::realnum > *arg2 = (std::complex< meep::realnum > *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (std::complex< meep::realnum > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } if (arg1) (arg1)->dft_phase = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_phase_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-dft-phase-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< meep::realnum > *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (std::complex< meep::realnum > *) ((arg1)->dft_phase); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_avg1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-avg1-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->avg1 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_avg1_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-avg1-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->avg1); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_avg2_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-avg2-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->avg2 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_avg2_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-avg2-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->avg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_vc_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-vc-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->vc = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_vc_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-vc-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->vc); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::save_dft_hdf5(arg1,arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::save_dft_hdf5(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::load_dft_hdf5(arg1,arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::load_dft_hdf5(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::save_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::save_dft_hdf5(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5(SCM rest) { #define FUNC_NAME "meep-save-dft-hdf5" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-save-dft-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_2(argc,argv); } } } } } scm_misc_error("meep-save-dft-hdf5", "No matching method for generic function `meep_save_dft_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::load_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::load_dft_hdf5(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5(SCM rest) { #define FUNC_NAME "meep-load-dft-hdf5" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-load-dft-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_2(argc,argv); } } } } } scm_misc_error("meep-load-dft-hdf5", "No matching method for generic function `meep_load_dft_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-flux" meep::component arg1 ; meep::component arg2 ; meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ; double arg5 ; double arg6 ; int arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_flux *result = 0 ; { arg1 = (meep::component const) scm_to_int(argv[0]); } { arg2 = (meep::component const) scm_to_int(argv[1]); } { arg3 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__dft_chunk, 3, 0); } { arg4 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__dft_chunk, 4, 0); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (int) scm_to_int(argv[6]); } result = (meep::dft_flux *)new meep::dft_flux(arg1,arg2,arg3,arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-flux" meep::dft_flux *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_flux *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_flux *)new meep::dft_flux((meep::dft_flux const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux(SCM rest) { #define FUNC_NAME "new-meep-dft-flux" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "new-meep-dft-flux"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_dft_flux__SWIG_1(argc,argv); } } if (argc == 7) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[6])) && scm_is_true(scm_exact_p(argv[6]))? 1 : 0; } if (_v) { return _wrap_new_meep_dft_flux__SWIG_0(argc,argv); } } } } } } } } scm_misc_error("new-meep-dft-flux", "No matching method for generic function `new_meep_dft_flux'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_flux (SCM s_0) { #define FUNC_NAME "meep-dft-flux-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double *)(arg1)->flux(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->save_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->load_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_meep_dft_flux_subeq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-meep-dft-flux-subeq" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_flux *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_flux *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_flux, 2, 0); } (arg1)->operator -=((meep::dft_flux const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-flux-save-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-flux-save-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-flux-save-hdf5", "No matching method for generic function `meep_dft_flux_save_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-flux-load-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-flux-load-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-flux-load-hdf5", "No matching method for generic function `meep_dft_flux_load_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_scale_dfts (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-scale-dfts" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dfts(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_remove (SCM s_0) { #define FUNC_NAME "meep-dft-flux-remove" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_freq_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-freq-min-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->freq_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_freq_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-freq-min-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double) ((arg1)->freq_min); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_dfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-dfreq-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_dfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-dfreq-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double) ((arg1)->dfreq); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_Nfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-Nfreq-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->Nfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_Nfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-Nfreq-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (int) ((arg1)->Nfreq); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_E_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-E-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->E = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_E_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-E-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_chunk *) ((arg1)->E); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_H_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-H-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->H = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_H_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-H-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_chunk *) ((arg1)->H); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cE_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-cE-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } if (arg1) (arg1)->cE = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cE_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-cE-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::component) ((arg1)->cE); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cH_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-cH-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } if (arg1) (arg1)->cH = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cH_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-cH-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::component) ((arg1)->cH); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_flux (SCM s_0) { #define FUNC_NAME "delete-meep-dft-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-force" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_force *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__dft_chunk, 2, 0); } { arg3 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__dft_chunk, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } result = (meep::dft_force *)new meep::dft_force(arg1,arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-force" meep::dft_force *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_force *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_force *)new meep::dft_force((meep::dft_force const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force(SCM rest) { #define FUNC_NAME "new-meep-dft-force" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "new-meep-dft-force"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_dft_force__SWIG_1(argc,argv); } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { return _wrap_new_meep_dft_force__SWIG_0(argc,argv); } } } } } } } scm_misc_error("new-meep-dft-force", "No matching method for generic function `new_meep_dft_force'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_force (SCM s_0) { #define FUNC_NAME "meep-dft-force-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double *)(arg1)->force(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->save_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->load_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-force-save-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-force-save-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-force-save-hdf5", "No matching method for generic function `meep_dft_force_save_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-force-load-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-force-load-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-force-load-hdf5", "No matching method for generic function `meep_dft_force_load_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_scale_dfts (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-scale-dfts" meep::dft_force *arg1 = (meep::dft_force *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dfts(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_remove (SCM s_0) { #define FUNC_NAME "meep-dft-force-remove" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_freq_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-freq-min-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->freq_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_freq_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-freq-min-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double) ((arg1)->freq_min); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_dfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-dfreq-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_dfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-dfreq-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double) ((arg1)->dfreq); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_Nfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-Nfreq-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->Nfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_Nfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-Nfreq-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (int) ((arg1)->Nfreq); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-offdiag1-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->offdiag1 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag1_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-offdiag1-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->offdiag1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag2_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-offdiag2-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->offdiag2 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag2_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-offdiag2-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->offdiag2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_diag_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-diag-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->diag = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_diag_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-diag-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->diag); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_force (SCM s_0) { #define FUNC_NAME "delete-meep-dft-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_near2far__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-near2far" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; double arg3 ; int arg4 ; double arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_near2far *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } result = (meep::dft_near2far *)new meep::dft_near2far(arg1,arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_near2far, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_near2far__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-near2far" meep::dft_near2far *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_near2far *result = 0 ; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (meep::dft_near2far *)new meep::dft_near2far((meep::dft_near2far const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_near2far, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_near2far(SCM rest) { #define FUNC_NAME "new-meep-dft-near2far" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "new-meep-dft-near2far"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_dft_near2far__SWIG_1(argc,argv); } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_dft_near2far__SWIG_0(argc,argv); } } } } } } } scm_misc_error("new-meep-dft-near2far", "No matching method for generic function `new_meep_dft_near2far'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_farfield (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-farfield" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (std::complex< double > *)(arg1)->farfield((meep::vec const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_farfield_lowlevel (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-dft-near2far-farfield-lowlevel" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; std::complex< double > *arg2 = (std::complex< double > *) 0 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; (arg1)->farfield_lowlevel(arg2,(meep::vec const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_farfields (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-dft-near2far-save-farfields" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; meep::volume *arg4 = 0 ; double arg5 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(s_2); must_free3 = 1; } { arg4 = (meep::volume *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (double) scm_to_double(s_4); } (arg1)->save_farfields((char const *)arg2,(char const *)arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->save_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->load_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_save_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-near2far-save-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-near2far-save-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_near2far_save_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_save_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_save_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_save_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_save_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-near2far-save-hdf5", "No matching method for generic function `meep_dft_near2far_save_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_load_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-near2far-load-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-near2far-load-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_near2far_load_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_load_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_load_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_load_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_near2far, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_near2far_load_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-near2far-load-hdf5", "No matching method for generic function `meep_dft_near2far_load_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_scale_dfts (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-scale-dfts" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dfts(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_remove (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-remove" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_freq_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-freq-min-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->freq_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_freq_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-freq-min-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (double) ((arg1)->freq_min); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_dfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-dfreq-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_dfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-dfreq-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (double) ((arg1)->dfreq); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_Nfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-Nfreq-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->Nfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_Nfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-Nfreq-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (int) ((arg1)->Nfreq); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_F_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-F-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->F = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_F_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-F-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (meep::dft_chunk *) ((arg1)->F); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_eps_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-eps-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->eps = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_eps_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-eps-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (double) ((arg1)->eps); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_mu_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-near2far-mu-set" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->mu = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_near2far_mu_get (SCM s_0) { #define FUNC_NAME "meep-dft-near2far-mu-get" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } result = (double) ((arg1)->mu); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_near2far (SCM s_0) { #define FUNC_NAME "delete-meep-dft-near2far" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_ldos (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "new-meep-dft-ldos" double arg1 ; double arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_ldos *result = 0 ; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (int) scm_to_int(s_2); } result = (meep::dft_ldos *)new meep::dft_ldos(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_ldos, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_ldos (SCM s_0) { #define FUNC_NAME "delete-meep-dft-ldos" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_update (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-ldos-update" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; meep::fields *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__fields, 2, 0); } (arg1)->update(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_ldos (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-ldos" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (double *)((meep::dft_ldos const *)arg1)->ldos(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_F (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-F" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (std::complex< double > *)((meep::dft_ldos const *)arg1)->F(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_J (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-J" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (std::complex< double > *)((meep::dft_ldos const *)arg1)->J(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_omega_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-ldos-omega-min-set" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->omega_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_omega_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-omega-min-get" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (double) ((arg1)->omega_min); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_domega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-ldos-domega-set" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->domega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_domega_get (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-domega-get" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (double) ((arg1)->domega); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_Nomega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-ldos-Nomega-set" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->Nomega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_ldos_Nomega_get (SCM s_0) { #define FUNC_NAME "meep-dft-ldos-Nomega-get" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = (int) ((arg1)->Nomega); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_in_or_out_Incoming(SCM s_0) { #define FUNC_NAME "meep-in-or-out-Incoming" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_in_or_out_Incoming); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_in_or_out_Outgoing(SCM s_0) { #define FUNC_NAME "meep-in-or-out-Outgoing" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_in_or_out_Outgoing); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_PHASE(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-PHASE" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_connect_phase_CONNECT_PHASE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_NEGATE(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-NEGATE" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_connect_phase_CONNECT_NEGATE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_COPY(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-COPY" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_connect_phase_CONNECT_COPY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_data_set (SCM s_0, SCM s_1) { #define FUNC_NAME "polarization-state-data-set" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } if (arg1) (arg1)->data = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_data_get (SCM s_0) { #define FUNC_NAME "polarization-state-data-get" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; void *result = 0 ; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } result = (void *) ((arg1)->data); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_void, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_s_set (SCM s_0, SCM s_1) { #define FUNC_NAME "polarization-state-s-set" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; meep::susceptibility *arg2 = (meep::susceptibility *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } { arg2 = (meep::susceptibility *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__susceptibility, 2, 0); } if (arg1) (arg1)->s = (meep::susceptibility const *)arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_s_get (SCM s_0) { #define FUNC_NAME "polarization-state-s-get" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::susceptibility *result = 0 ; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } result = (meep::susceptibility *) ((arg1)->s); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__susceptibility, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "polarization-state-next-set" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; meep::polarization_state_s *arg2 = (meep::polarization_state_s *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } { arg2 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__polarization_state_s, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_polarization_state_next_get (SCM s_0) { #define FUNC_NAME "polarization-state-next-get" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarization_state_s *result = 0 ; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } result = (meep::polarization_state_s *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__polarization_state_s, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_polarization_state () { #define FUNC_NAME "new-polarization-state" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarization_state_s *result = 0 ; result = (meep::polarization_state_s *)new meep::polarization_state_s(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__polarization_state_s, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_polarization_state (SCM s_0) { #define FUNC_NAME "delete-polarization-state" meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarization_state_s *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarization_state_s, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-u-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_u); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-u-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_u); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-w-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_w); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-w-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_w); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-cond-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_cond); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-cond-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_cond); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-u-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_u_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-u-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_u_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-w-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_w_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-w-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_w_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-cond-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_cond_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-cond-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_cond_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_prev_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-w-prev-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_w_prev); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_prev_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-w-prev-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_w_prev); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_minus_p_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-minus-p-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_minus_p); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_minus_p_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-minus-p-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_minus_p); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_rderiv_int_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-rderiv-int-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *arg2 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } if (arg1) (arg1)->f_rderiv_int = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_rderiv_int_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-rderiv-int-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *) ((arg1)->f_rderiv_int); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dft_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-dft-chunks-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->dft_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dft_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-dft-chunks-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->dft_chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zeroes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zeroes-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum ***arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_double, 2, 0); } { size_t ii; meep::realnum ** *b = (meep::realnum ** *) arg1->zeroes; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::realnum ** *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zeroes_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zeroes-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum ***result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum ***)(meep::realnum ***) ((arg1)->zeroes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_zeroes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-num-zeroes-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0); } { size_t ii; int *b = (int *) arg1->num_zeroes; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((int *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_zeroes_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-num-zeroes-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int *)(int *) ((arg1)->num_zeroes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connections_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-connections-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum **(*arg2)[meep::CONNECT_COPY+1][meep::Outgoing+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 2, 0); } { meep::realnum ** (*inp)[meep::CONNECT_COPY+1] = (meep::realnum ** (*)[meep::CONNECT_COPY+1])(arg2); meep::realnum ** (*dest)[meep::CONNECT_COPY+1] = (meep::realnum ** (*)[meep::CONNECT_COPY+1])(arg1->connections); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { meep::realnum ** *ip = inp[ii]; meep::realnum ** *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connections_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-connections-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **(*result)[meep::CONNECT_COPY+1][meep::Outgoing+1] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1])(meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]) ((arg1)->connections); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_connections_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-num-connections-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int (*arg2)[meep::CONNECT_COPY+1][meep::Outgoing+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 2, 0); } { int (*inp)[meep::CONNECT_COPY+1] = (int (*)[meep::CONNECT_COPY+1])(arg2); int (*dest)[meep::CONNECT_COPY+1] = (int (*)[meep::CONNECT_COPY+1])(arg1->num_connections); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { int *ip = inp[ii]; int *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_connections_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-num-connections-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int (*result)[meep::CONNECT_COPY+1][meep::Outgoing+1] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1])(int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1]) ((arg1)->num_connections); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connection_phases_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-connection-phases-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; std::complex< meep::realnum > **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (std::complex< meep::realnum > **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_std__complexT_double_t, 2, 0); } { size_t ii; std::complex< meep::realnum > * *b = (std::complex< meep::realnum > * *) arg1->connection_phases; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((std::complex< meep::realnum > * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connection_phases_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-connection-phases-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< meep::realnum > **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (std::complex< meep::realnum > **)(std::complex< meep::realnum > **) ((arg1)->connection_phases); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_npol_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-npol-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0); } { size_t ii; int *b = (int *) arg1->npol; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((int *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_npol_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-npol-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int *)(int *) ((arg1)->npol); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_pol_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-pol-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::polarization_state **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::polarization_state **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__polarization_state_s, 2, 0); } { size_t ii; meep::polarization_state * *b = (meep::polarization_state * *) arg1->pol; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::polarization_state * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_pol_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-pol-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarization_state **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::polarization_state **)(meep::polarization_state **) ((arg1)->pol); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__polarization_state_s, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-a-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_a_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-a-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-Courant-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_Courant_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-Courant-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-dt-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dt_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-dt-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-gv-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_gv_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-gv-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-v-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_v_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-v-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_m_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-m-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->m = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_m_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-m-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->m); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields_near_cylorigin_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zero-fields-near-cylorigin-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (bool) scm_is_true(s_1); } if (arg1) (arg1)->zero_fields_near_cylorigin = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields_near_cylorigin_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zero-fields-near-cylorigin-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (bool) ((arg1)->zero_fields_near_cylorigin); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_beta_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-beta-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->beta = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_beta_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-beta-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->beta); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_real_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-is-real-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->is_real = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_real_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-is-real-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int) ((arg1)->is_real); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_bands_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-bands-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::bandsdata *arg2 = (meep::bandsdata *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::bandsdata *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__bandsdata, 2, 0); } if (arg1) (arg1)->bands = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_bands_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-bands-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::bandsdata *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::bandsdata *) ((arg1)->bands); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__bandsdata, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_sources_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-sources-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::src_vol **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::src_vol **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__src_vol, 2, 0); } { size_t ii; meep::src_vol * *b = (meep::src_vol * *) arg1->sources; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::src_vol * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_sources_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-sources-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_vol **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::src_vol **)(meep::src_vol **) ((arg1)->sources); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__src_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_new_s_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-new-s-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->new_s = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_new_s_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-new-s-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::structure_chunk *) ((arg1)->new_s); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_s_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-s-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->s = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_s_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-s-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::structure_chunk *) ((arg1)->s); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-outdir-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { if (arg2) { arg1->outdir = (char const *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_outdir_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-outdir-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; double arg4 ; bool arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (bool) scm_is_true(argv[4]); } result = (meep::fields_chunk *)new meep::fields_chunk(arg1,(char const *)arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields_chunk, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields-chunk" meep::fields_chunk *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::fields_chunk *)new meep::fields_chunk((meep::fields_chunk const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk(SCM rest) { #define FUNC_NAME "new-meep-fields-chunk" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "new-meep-fields-chunk"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields_chunk__SWIG_1(argc,argv); } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields_chunk__SWIG_0(argc,argv); } } } } } } scm_misc_error("new-meep-fields-chunk", "No matching method for generic function `new_meep_fields_chunk'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_fields_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-fields-chunk" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_peek_field (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-chunk-peek-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->peek_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_use_real_fields (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-use-real-fields" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->use_real_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-have-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (bool) scm_is_true(argv[2]); } result = (bool)(arg1)->have_component(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-have-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } result = (bool)(arg1)->have_component(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component(SCM rest) { #define FUNC_NAME "meep-fields-chunk-have-component" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-have-component"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_have_component__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_have_component__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-chunk-have-component", "No matching method for generic function `meep_fields_chunk_have_component'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_last_source_time (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-last-source-time" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double)(arg1)->last_source_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__ivec, 3, 0); } result = ((meep::fields_chunk const *)arg1)->get_field(arg2,(meep::ivec const &)*arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field_gv (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-get-field-gv" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = ((meep::fields_chunk const *)arg1)->get_field_gv(arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields_chunk const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field(SCM rest) { #define FUNC_NAME "meep-fields-chunk-get-field" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-get-field"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_get_field__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_chunk_get_field__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-chunk-get-field", "No matching method for generic function `meep_fields_chunk_get_field'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-chunk-get-chi1inv" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::fields_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_backup_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-backup-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } (arg1)->backup_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_average_with_backup (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-average-with-backup" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } (arg1)->average_with_backup(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_restore_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-restore-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } (arg1)->restore_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-set-output-directory" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-verbose" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } (arg1)->verbose(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-verbose" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->verbose(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose(SCM rest) { #define FUNC_NAME "meep-fields-chunk-verbose" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-fields-chunk-verbose"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_verbose__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_verbose__SWIG_0(argc,argv); } } } scm_misc_error("meep-fields-chunk-verbose", "No matching method for generic function `meep_fields_chunk_verbose'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_count_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-count-volume" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (double)(arg1)->count_volume(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_n_proc (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-n-proc" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int)((meep::fields_chunk const *)arg1)->n_proc(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_mine (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-is-mine" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int)((meep::fields_chunk const *)arg1)->is_mine(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_metal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zero-metal" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } (arg1)->zero_metal(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_needs_W_notowned (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-needs-W-notowned" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->needs_W_notowned(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_remove_sources (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-remove-sources" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->remove_sources(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_remove_susceptibilities (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-remove-susceptibilities" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->remove_susceptibilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zero-fields" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->zero_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_needs_W_prev (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-needs-W-prev" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)((meep::fields_chunk const *)arg1)->needs_W_prev(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-update-eh" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_to_int(argv[1]); } { arg3 = (bool) scm_is_true(argv[2]); } result = (bool)(arg1)->update_eh(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-update-eh" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_to_int(argv[1]); } result = (bool)(arg1)->update_eh(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh(SCM rest) { #define FUNC_NAME "meep-fields-chunk-update-eh" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-update-eh"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_update_eh__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_update_eh__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-chunk-update-eh", "No matching method for generic function `meep_fields_chunk_update_eh'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_alloc_f (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-alloc-f" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->alloc_f(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_figure_out_step_plan (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-figure-out-step-plan" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->figure_out_step_plan(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_set_solve_cw_omega (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-set-solve-cw-omega" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_solve_cw_omega(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_unset_solve_cw_omega (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-unset-solve-cw-omega" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->unset_solve_cw_omega(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Periodic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Periodic" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_condition_Periodic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Metallic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Metallic" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_condition_Metallic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Magnetic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Magnetic" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_condition_Magnetic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_None(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-None" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_boundary_condition_None); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Connecting(SCM s_0) { #define FUNC_NAME "meep-time-sink-Connecting" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_Connecting); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Stepping(SCM s_0) { #define FUNC_NAME "meep-time-sink-Stepping" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_Stepping); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Boundaries(SCM s_0) { #define FUNC_NAME "meep-time-sink-Boundaries" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_Boundaries); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_MpiTime(SCM s_0) { #define FUNC_NAME "meep-time-sink-MpiTime" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_MpiTime); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_FieldOutput(SCM s_0) { #define FUNC_NAME "meep-time-sink-FieldOutput" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_FieldOutput); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_FourierTransforming(SCM s_0) { #define FUNC_NAME "meep-time-sink-FourierTransforming" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_FourierTransforming); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Other(SCM s_0) { #define FUNC_NAME "meep-time-sink-Other" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_time_sink_Other); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_func (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-derived-component-func" meep::derived_component arg1 ; meep::grid_volume *arg2 = 0 ; int *arg3 = 0 ; meep::component *arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::field_rfunction result; { arg1 = (meep::derived_component) scm_to_int(s_0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (meep::component *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__component, 4, 0); } result = (meep::field_rfunction)meep::derived_component_func(arg1,(meep::grid_volume const &)*arg2,*arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_num_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-num-chunks-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->num_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_num_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-num-chunks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->num_chunks); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunks-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields_chunk **arg2 = (meep::fields_chunk **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields_chunk **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__fields_chunk, 2, 0); } if (arg1) (arg1)->chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk **result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::fields_chunk **) ((arg1)->chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__fields_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sources_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-sources-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } if (arg1) (arg1)->sources = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sources_get (SCM s_0) { #define FUNC_NAME "meep-fields-sources-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::src_time *) ((arg1)->sources); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_fluxes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-fluxes-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::flux_vol *arg2 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::flux_vol *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__flux_vol, 2, 0); } if (arg1) (arg1)->fluxes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_fluxes_get (SCM s_0) { #define FUNC_NAME "meep-fields-fluxes-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::flux_vol *) ((arg1)->fluxes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_S_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-S-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::symmetry *arg2 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } if (arg1) (arg1)->S = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_S_get (SCM s_0) { #define FUNC_NAME "meep-fields-S-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::symmetry *)& ((arg1)->S); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_blocks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-comm-blocks-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::realnum ***arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::realnum ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_double, 2, 0); } { size_t ii; meep::realnum ** *b = (meep::realnum ** *) arg1->comm_blocks; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::realnum ** *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_blocks_get (SCM s_0) { #define FUNC_NAME "meep-fields-comm-blocks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum ***result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::realnum ***)(meep::realnum ***) ((arg1)->comm_blocks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_sizes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-comm-sizes-set" meep::fields *arg1 = (meep::fields *) 0 ; int *(*arg2)[meep::CONNECT_COPY+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int *(*)[meep::CONNECT_COPY+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__p_int, 2, 0); } { int * (*inp)[meep::CONNECT_COPY+1] = (int * (*)[meep::CONNECT_COPY+1])(arg2); int * (*dest)[meep::CONNECT_COPY+1] = (int * (*)[meep::CONNECT_COPY+1])(arg1->comm_sizes); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { int * *ip = inp[ii]; int * *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_sizes_get (SCM s_0) { #define FUNC_NAME "meep-fields-comm-sizes-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *(*result)[meep::CONNECT_COPY+1] = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int *(*)[meep::CONNECT_COPY+1])(int *(*)[meep::CONNECT_COPY+1]) ((arg1)->comm_sizes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_size_tot (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-comm-size-tot" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { arg3 = (int) scm_to_int(s_2); } result = (int)((meep::fields const *)arg1)->comm_size_tot(arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-a-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_a_get (SCM s_0) { #define FUNC_NAME "meep-fields-a-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-dt-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_dt_get (SCM s_0) { #define FUNC_NAME "meep-fields-dt-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-gv-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_gv_get (SCM s_0) { #define FUNC_NAME "meep-fields-gv-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_user_volume_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-user-volume-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->user_volume = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_user_volume_get (SCM s_0) { #define FUNC_NAME "meep-fields-user-volume-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::grid_volume *)& ((arg1)->user_volume); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-v-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_v_get (SCM s_0) { #define FUNC_NAME "meep-fields-v-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_m_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-m-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->m = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_m_get (SCM s_0) { #define FUNC_NAME "meep-fields-m-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->m); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_beta_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-beta-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->beta = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_beta_get (SCM s_0) { #define FUNC_NAME "meep-fields-beta-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->beta); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-t-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_t_get (SCM s_0) { #define FUNC_NAME "meep-fields-t-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->t); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phasein_time_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-phasein-time-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->phasein_time = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phasein_time_get (SCM s_0) { #define FUNC_NAME "meep-fields-phasein-time-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->phasein_time); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_real_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-is-real-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->is_real = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_real_get (SCM s_0) { #define FUNC_NAME "meep-fields-is-real-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->is_real); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_k_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-k-set" meep::fields *arg1 = (meep::fields *) 0 ; std::complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } { size_t ii; std::complex< double > *b = (std::complex< double > *) arg1->k; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((std::complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_k_get (SCM s_0) { #define FUNC_NAME "meep-fields-k-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (std::complex< double > *)(std::complex< double > *) ((arg1)->k); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_eikna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-eikna-set" meep::fields *arg1 = (meep::fields *) 0 ; std::complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (std::complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_std__complexT_double_t, 2, 0); } { size_t ii; std::complex< double > *b = (std::complex< double > *) arg1->eikna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((std::complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_eikna_get (SCM s_0) { #define FUNC_NAME "meep-fields-eikna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (std::complex< double > *)(std::complex< double > *) ((arg1)->eikna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_coskna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-coskna-set" meep::fields *arg1 = (meep::fields *) 0 ; double *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } { size_t ii; double *b = (double *) arg1->coskna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_coskna_get (SCM s_0) { #define FUNC_NAME "meep-fields-coskna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double *)(double *) ((arg1)->coskna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sinkna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-sinkna-set" meep::fields *arg1 = (meep::fields *) 0 ; double *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } { size_t ii; double *b = (double *) arg1->sinkna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sinkna_get (SCM s_0) { #define FUNC_NAME "meep-fields-sinkna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double *)(double *) ((arg1)->sinkna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_boundaries_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-boundaries-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::boundary_condition (*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::boundary_condition (*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__meep__boundary_condition, 2, 0); } { meep::boundary_condition (*inp)[5] = (meep::boundary_condition (*)[5])(arg2); meep::boundary_condition (*dest)[5] = (meep::boundary_condition (*)[5])(arg1->boundaries); size_t ii = 0; for (; ii < 2; ++ii) { meep::boundary_condition *ip = inp[ii]; meep::boundary_condition *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_boundaries_get (SCM s_0) { #define FUNC_NAME "meep-fields-boundaries-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_condition (*result)[5] = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::boundary_condition (*)[5])(meep::boundary_condition (*)[5]) ((arg1)->boundaries); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__meep__boundary_condition, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_bands_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-bands-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::bandsdata *arg2 = (meep::bandsdata *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::bandsdata *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__bandsdata, 2, 0); } if (arg1) (arg1)->bands = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_bands_get (SCM s_0) { #define FUNC_NAME "meep-fields-bands-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::bandsdata *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::bandsdata *) ((arg1)->bands); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__bandsdata, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-outdir-set" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { delete [] arg1->outdir; if (arg2) { arg1->outdir = (char *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_outdir_get (SCM s_0) { #define FUNC_NAME "meep-fields-outdir-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = SWIG_str02scm((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; double arg3 ; bool arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (bool) scm_is_true(argv[3]); } result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } result = (meep::fields *)new meep::fields(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } result = (meep::fields *)new meep::fields(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::fields *)new meep::fields(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::fields *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::fields *)new meep::fields((meep::fields const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields(SCM rest) { #define FUNC_NAME "new-meep-fields" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-fields"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields__SWIG_3(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields__SWIG_4(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-fields", "No matching method for generic function `new_meep_fields'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_fields (SCM s_0) { #define FUNC_NAME "delete-meep-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_equal_layout (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-equal-layout" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__fields, 2, 0); } result = (bool)((meep::fields const *)arg1)->equal_layout((meep::fields const &)*arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_real_fields (SCM s_0) { #define FUNC_NAME "meep-fields-use-real-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->use_real_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_zero_fields (SCM s_0) { #define FUNC_NAME "meep-fields-zero-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->zero_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_sources (SCM s_0) { #define FUNC_NAME "meep-fields-remove-sources" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_sources(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_susceptibilities (SCM s_0) { #define FUNC_NAME "meep-fields-remove-susceptibilities" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_susceptibilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_fluxes (SCM s_0) { #define FUNC_NAME "meep-fields-remove-fluxes" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_fluxes(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_reset (SCM s_0) { #define FUNC_NAME "meep-fields-reset" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->reset(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_time_spent_on (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-time-spent-on" meep::fields *arg1 = (meep::fields *) 0 ; meep::time_sink arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::time_sink) scm_to_int(s_1); } result = (double)(arg1)->time_spent_on(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_print_times (SCM s_0) { #define FUNC_NAME "meep-fields-print-times" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->print_times(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_set_boundary (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-set-boundary" meep::fields *arg1 = (meep::fields *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; meep::boundary_condition arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::boundary_side) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } { arg4 = (meep::boundary_condition) scm_to_int(s_3); } (arg1)->set_boundary(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } (arg1)->use_bloch(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; std::complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } (arg1)->use_bloch(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->use_bloch((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch(SCM rest) { #define FUNC_NAME "meep-fields-use-bloch" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-use-bloch"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-use-bloch", "No matching method for generic function `meep_fields_use_bloch'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_lattice_vector (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-lattice-vector" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = ((meep::fields const *)arg1)->lattice_vector(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-update-eh" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_to_int(argv[1]); } { arg3 = (bool) scm_is_true(argv[2]); } (arg1)->update_eh(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-update-eh" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_to_int(argv[1]); } (arg1)->update_eh(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh(SCM rest) { #define FUNC_NAME "meep-fields-update-eh" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-update-eh"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_update_eh__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_update_eh__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-update-eh", "No matching method for generic function `meep_fields_update_eh'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_total_volume (SCM s_0) { #define FUNC_NAME "meep-fields-total-volume" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = ((meep::fields const *)arg1)->total_volume(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; meep::component *arg5 = (meep::component *) 0 ; meep::field_function arg6 = (meep::field_function) 0 ; void *arg7 = (void *) 0 ; int arg8 ; meep::volume *arg9 = 0 ; bool arg10 ; bool arg11 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(gh_car(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(gh_car(argv[3]), i)); data4.nf = arg4; data4.func = gh_cdr(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_to_int(argv[4]); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (bool) scm_is_true(argv[6]); } { arg11 = (bool) scm_is_true(argv[7]); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10,arg11); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; meep::component *arg5 = (meep::component *) 0 ; meep::field_function arg6 = (meep::field_function) 0 ; void *arg7 = (void *) 0 ; int arg8 ; meep::volume *arg9 = 0 ; bool arg10 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(gh_car(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(gh_car(argv[3]), i)); data4.nf = arg4; data4.func = gh_cdr(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_to_int(argv[4]); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (bool) scm_is_true(argv[6]); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; meep::component *arg5 = (meep::component *) 0 ; meep::field_function arg6 = (meep::field_function) 0 ; void *arg7 = (void *) 0 ; int arg8 ; meep::volume *arg9 = 0 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(gh_car(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(gh_car(argv[3]), i)); data4.nf = arg4; data4.func = gh_cdr(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_to_int(argv[4]); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; bool arg10 ; char *arg11 = (char *) 0 ; bool arg12 ; int must_free2 = 0 ; my_field_func_data data3 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[5]); } { arg10 = (bool) scm_is_true(argv[6]); } { arg11 = (char *)SWIG_scm2str(argv[7]); must_free11 = 1; } { arg12 = (bool) scm_is_true(argv[8]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11,arg12); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; bool arg10 ; char *arg11 = (char *) 0 ; int must_free2 = 0 ; my_field_func_data data3 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[5]); } { arg10 = (bool) scm_is_true(argv[6]); } { arg11 = (char *)SWIG_scm2str(argv[7]); must_free11 = 1; } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; bool arg10 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[5]); } { arg10 = (bool) scm_is_true(argv[6]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[5]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_function arg5 = (meep::field_function) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(gh_car(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(argv[2]), i)); data3.nf = arg3; data3.func = gh_cdr(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_9 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_rfunction arg5 = (meep::field_rfunction) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; bool arg10 ; char *arg11 = (char *) 0 ; int must_free2 = 0 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[8]); } { arg10 = (bool) scm_is_true(argv[9]); } { arg11 = (char *)SWIG_scm2str(argv[10]); must_free11 = 1; } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_10 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_rfunction arg5 = (meep::field_rfunction) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; bool arg10 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[8]); } { arg10 = (bool) scm_is_true(argv[9]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_11 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_rfunction arg5 = (meep::field_rfunction) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; bool arg9 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) scm_is_true(argv[8]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_12 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_rfunction arg5 = (meep::field_rfunction) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; meep::h5file *arg8 = (meep::h5file *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_13 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; meep::field_rfunction arg5 = (meep::field_rfunction) 0 ; void *arg6 = (void *) 0 ; meep::volume *arg7 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_14 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; char *arg7 = (char *) 0 ; int must_free7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } { arg7 = (char *)SWIG_scm2str(argv[6]); must_free7 = 1; } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7); gswig_result = SCM_UNSPECIFIED; if (must_free7 && arg7) SWIG_free(arg7); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_15 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_16 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_17 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_18 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_19 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; char *arg7 = (char *) 0 ; int must_free7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } { arg7 = (char *)SWIG_scm2str(argv[6]); must_free7 = 1; } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7); gswig_result = SCM_UNSPECIFIED; if (must_free7 && arg7) SWIG_free(arg7); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_20 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_21 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) scm_is_true(argv[4]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_22 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_23 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5(SCM rest) { #define FUNC_NAME "meep-fields-output-hdf5" SCM argv[11]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 11, "meep-fields-output-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_18(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_23(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_22(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_17(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_8(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_21(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_16(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_7(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(gh_car(argv[3]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[3]))); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_2(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_20(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_15(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_6(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(gh_car(argv[3]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[3]))); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_1(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_19(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_14(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_5(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_13(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(gh_car(argv[3]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[3]))); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[7]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_0(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[7]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_4(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_12(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[7]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_3(argc,argv); } } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_11(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_10(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[10]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_9(argc,argv); } } } } } } } } } } } } scm_misc_error("meep-fields-output-hdf5", "No matching method for generic function `meep_fields_output_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; char *arg4 = (char *) 0 ; bool arg5 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_to_int(argv[2]); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (bool) scm_is_true(argv[4]); } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_to_int(argv[2]); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_to_int(argv[2]); } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file(SCM rest) { #define FUNC_NAME "meep-fields-open-h5file" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-fields-open-h5file"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_string(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-fields-open-h5file", "No matching method for generic function `meep_fields_open_h5file'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; bool arg4 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (bool) scm_is_true(argv[3]); } result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3,arg4); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)(arg1)->h5file_name((char const *)arg2); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name(SCM rest) { #define FUNC_NAME "meep-fields-h5file-name" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-fields-h5file-name"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-fields-h5file-name", "No matching method for generic function `meep_fields_h5file_name'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_wall_time_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-last-step-output-wall-time-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(s_1); } if (arg1) (arg1)->last_step_output_wall_time = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_wall_time_get (SCM s_0) { #define FUNC_NAME "meep-fields-last-step-output-wall-time-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->last_step_output_wall_time); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-last-step-output-t-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } if (arg1) (arg1)->last_step_output_t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_t_get (SCM s_0) { #define FUNC_NAME "meep-fields-last-step-output-t-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->last_step_output_t); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_step (SCM s_0) { #define FUNC_NAME "meep-fields-step" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->step(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_round_time (SCM s_0) { #define FUNC_NAME "meep-fields-round-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->round_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_time (SCM s_0) { #define FUNC_NAME "meep-fields-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; std::complex< double > arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[3]); arg4 = std::complex(cnum.re, cnum.im); } { arg5 = (int) scm_to_int(argv[4]); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; std::complex< double > arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[3]); arg4 = std::complex(cnum.re, cnum.im); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (int) scm_to_int(argv[3]); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (bool)(arg1)->solve_cw(arg2,arg3); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } result = (bool)(arg1)->solve_cw(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } result = (bool)(arg1)->solve_cw(); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw(SCM rest) { #define FUNC_NAME "meep-fields-solve-cw" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-fields-solve-cw"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_5(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_2(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[3]); } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[3]); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-fields-solve-cw", "No matching method for generic function `meep_fields_solve_cw'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_last_source_time (SCM s_0) { #define FUNC_NAME "meep-fields-last-source-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->last_source_time(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; std::complex< double > arg8 ; int arg9 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (int) scm_to_int(argv[8]); } (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; std::complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::vec *arg4 = 0 ; std::complex< double > arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; { cnumber cnum = ctl_convert_cnumber_to_c(argv[4]); arg5 = std::complex(cnum.re, cnum.im); } (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source(SCM rest) { #define FUNC_NAME "meep-fields-add-point-source" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "meep-fields-add-point-source"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_4(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { { _v = SwigComplex_Check(argv[4]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_3(argc,argv); } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_2(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_1(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[8])) && scm_is_true(scm_exact_p(argv[8]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_0(argc,argv); } } } } } } } } } } scm_misc_error("meep-fields-add-point-source", "No matching method for generic function `meep_fields_add_point_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; std::complex< double > (*arg5)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ; std::complex< double > arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { my_complex_func_scm = argv[4]; arg5 = my_complex_func; } { cnumber cnum = ctl_convert_cnumber_to_c(argv[5]); arg6 = std::complex(cnum.re, cnum.im); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; std::complex< double > (*arg5)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { my_complex_func_scm = argv[4]; arg5 = my_complex_func; } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; std::complex< double > arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[4]); arg5 = std::complex(cnum.re, cnum.im); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source(SCM rest) { #define FUNC_NAME "meep-fields-add-volume-source" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-add-volume-source"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_1(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigComplex_Check(argv[4]); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_2(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = SwigComplex_Check(argv[5]); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-add-volume-source", "No matching method for generic function `meep_fields_add_volume_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_require_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-require-component" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } (arg1)->require_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-eigenmode-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::direction arg4 ; meep::volume *arg5 = 0 ; meep::volume *arg6 = 0 ; int arg7 ; meep::vec *arg8 = 0 ; bool arg9 ; int arg10 ; double arg11 ; double arg12 ; std::complex< double > arg13 ; std::complex< double > (*arg14)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::direction) scm_to_int(argv[3]); } { arg5 = (meep::volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__volume, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (int) scm_to_int(argv[6]); } meep::vec vec__arg8 = vector3_to_vec(ctl_convert_vector3_to_c(argv[7])); arg8 = &vec__arg8; { arg9 = (bool) scm_is_true(argv[8]); } { arg10 = (int) scm_to_int(argv[9]); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[12]); arg13 = std::complex(cnum.re, cnum.im); } { my_complex_func_scm = argv[13]; arg14 = my_complex_func; } (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,arg4,(meep::volume const &)*arg5,(meep::volume const &)*arg6,arg7,(meep::vec const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-eigenmode-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::direction arg4 ; meep::volume *arg5 = 0 ; meep::volume *arg6 = 0 ; int arg7 ; meep::vec *arg8 = 0 ; bool arg9 ; int arg10 ; double arg11 ; double arg12 ; std::complex< double > arg13 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::direction) scm_to_int(argv[3]); } { arg5 = (meep::volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__volume, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (int) scm_to_int(argv[6]); } meep::vec vec__arg8 = vector3_to_vec(ctl_convert_vector3_to_c(argv[7])); arg8 = &vec__arg8; { arg9 = (bool) scm_is_true(argv[8]); } { arg10 = (int) scm_to_int(argv[9]); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[12]); arg13 = std::complex(cnum.re, cnum.im); } (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,arg4,(meep::volume const &)*arg5,(meep::volume const &)*arg6,arg7,(meep::vec const &)*arg8,arg9,arg10,arg11,arg12,arg13); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source(SCM rest) { #define FUNC_NAME "meep-fields-add-eigenmode-source" SCM argv[14]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 14, "meep-fields-add-eigenmode-source"); if (argc == 13) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[6])) && scm_is_true(scm_exact_p(argv[6]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[7]); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[9])) && scm_is_true(scm_exact_p(argv[9]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[12]); } if (_v) { return _wrap_meep_fields_add_eigenmode_source__SWIG_1(argc,argv); } } } } } } } } } } } } } } if (argc == 14) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[6])) && scm_is_true(scm_exact_p(argv[6]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[7]); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[9])) && scm_is_true(scm_exact_p(argv[9]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[12]); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[13])); } if (_v) { return _wrap_meep_fields_add_eigenmode_source__SWIG_0(argc,argv); } } } } } } } } } } } } } } } scm_misc_error("meep-fields-add-eigenmode-source", "No matching method for generic function `meep_fields_add_eigenmode_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_field (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-initialize-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; std::complex< double > (*arg3)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { my_complex_func_scm = s_2; arg3 = my_complex_func; } (arg1)->initialize_field(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_nth_te (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-nth-te" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } (arg1)->initialize_with_nth_te(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_nth_tm (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-nth-tm" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } (arg1)->initialize_with_nth_tm(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_n_te (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-n-te" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } (arg1)->initialize_with_n_te(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_n_tm (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-n-tm" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(s_1); } (arg1)->initialize_with_n_tm(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phase_in_material (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-phase-in-material" meep::fields *arg1 = (meep::fields *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (double) scm_to_double(s_2); } result = (int)(arg1)->phase_in_material((meep::structure const *)arg2,arg3); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_phasing (SCM s_0) { #define FUNC_NAME "meep-fields-is-phasing" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int)(arg1)->is_phasing(); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ; void *arg3 = (void *) 0 ; meep::volume *arg4 = 0 ; meep::component arg5 ; bool arg6 ; bool arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_to_int(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6,arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ; void *arg3 = (void *) 0 ; meep::volume *arg4 = 0 ; meep::component arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_to_int(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ; void *arg3 = (void *) 0 ; meep::volume *arg4 = 0 ; meep::component arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_to_int(argv[4]); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ; void *arg3 = (void *) 0 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks(SCM rest) { #define FUNC_NAME "meep-fields-loop-in-chunks" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "meep-fields-loop-in-chunks"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_2(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_1(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_0(argc,argv); } } } } } } } } scm_misc_error("meep-fields-loop-in-chunks", "No matching method for generic function `meep_fields_loop_in_chunks'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_function arg4 = (meep::field_function) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; double *arg7 = (double *) 0 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(gh_car(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(gh_car(argv[1]), i)); data2.nf = arg2; data2.func = gh_cdr(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (double *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_double, 7, 0); } result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_function arg4 = (meep::field_function) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(gh_car(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(gh_car(argv[1]), i)); data2.nf = arg2; data2.func = gh_cdr(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_rfunction arg4 = (meep::field_rfunction) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; double *arg7 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (double *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_double, 7, 0); } result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_rfunction arg4 = (meep::field_rfunction) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate(SCM rest) { #define FUNC_NAME "meep-fields-integrate" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "meep-fields-integrate"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(gh_car(argv[1]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(gh_car(argv[1]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_0(argc,argv); } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_3(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_2(argc,argv); } } } } } } } } scm_misc_error("meep-fields-integrate", "No matching method for generic function `meep_fields_integrate'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; int arg5 ; meep::component *arg6 = (meep::component *) 0 ; meep::field_function arg7 = (meep::field_function) 0 ; void *arg8 = (void *) 0 ; meep::volume *arg9 = 0 ; double *arg10 = (double *) 0 ; my_field_func_data data3 ; my_field_func_data data30 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = list_length(gh_car(gh_car(argv[2]))); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(gh_car(argv[2])), i)); arg5 = list_length(gh_cdr(gh_car(argv[2]))); arg6 = new meep::component[arg5]; for (int i = 0; i < arg5; ++i) arg6[i] = meep::component(integer_list_ref(gh_cdr(gh_car(argv[2])), i)); data3.nf = arg3 + arg5; data3.func = gh_cdr(argv[2]); arg7 = my_field_func; arg8 = &data3; } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 10, 0); } result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9,arg10); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } { if (arg4) delete[] arg4; if (arg6) delete[] arg6; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; int arg5 ; meep::component *arg6 = (meep::component *) 0 ; meep::field_function arg7 = (meep::field_function) 0 ; void *arg8 = (void *) 0 ; meep::volume *arg9 = 0 ; my_field_func_data data3 ; my_field_func_data data30 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = list_length(gh_car(gh_car(argv[2]))); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(gh_car(gh_car(argv[2])), i)); arg5 = list_length(gh_cdr(gh_car(argv[2]))); arg6 = new meep::component[arg5]; for (int i = 0; i < arg5; ++i) arg6[i] = meep::component(integer_list_ref(gh_cdr(gh_car(argv[2])), i)); data3.nf = arg3 + arg5; data3.func = gh_cdr(argv[2]); arg7 = my_field_func; arg8 = &data3; } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 9, 0); } result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } { if (arg4) delete[] arg4; if (arg6) delete[] arg6; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; int arg5 ; meep::component *arg6 = (meep::component *) 0 ; meep::field_rfunction arg7 = (meep::field_rfunction) 0 ; void *arg8 = (void *) 0 ; meep::volume *arg9 = 0 ; double *arg10 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (meep::component *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__component, 6, 0); } { arg7 = (meep::field_rfunction)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 7, 0); } { arg8 = (void *)SWIG_MustGetPtr(argv[7], NULL, 8, 0); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } result = (double)(arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9,arg10); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; int arg3 ; meep::component *arg4 = (meep::component *) 0 ; int arg5 ; meep::component *arg6 = (meep::component *) 0 ; meep::field_rfunction arg7 = (meep::field_rfunction) 0 ; void *arg8 = (void *) 0 ; meep::volume *arg9 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (meep::component *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__component, 6, 0); } { arg7 = (meep::field_rfunction)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 7, 0); } { arg8 = (void *)SWIG_MustGetPtr(argv[7], NULL, 8, 0); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__volume, 9, 0); } result = (double)(arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2(SCM rest) { #define FUNC_NAME "meep-fields-integrate2" SCM argv[10]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 10, "meep-fields-integrate2"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_pair_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_list_p(gh_car(gh_car(argv[2])))) && SCM_NFALSEP(scm_list_p(gh_cdr(gh_car(argv[2])))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_pair_p(gh_car(argv[2]))) && SCM_NFALSEP(scm_list_p(gh_car(gh_car(argv[2])))) && SCM_NFALSEP(scm_list_p(gh_cdr(gh_car(argv[2])))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_0(argc,argv); } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_3(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_2(argc,argv); } } } } } } } } } } } scm_misc_error("meep-fields-integrate2", "No matching method for generic function `meep_fields_integrate2'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_function arg4 = (meep::field_function) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(gh_car(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(gh_car(argv[1]), i)); data2.nf = arg2; data2.func = gh_cdr(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_from_double(result); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::component *arg3 = (meep::component *) 0 ; meep::field_rfunction arg4 = (meep::field_rfunction) 0 ; void *arg5 = (void *) 0 ; meep::volume *arg6 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs(SCM rest) { #define FUNC_NAME "meep-fields-max-abs" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-max-abs"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(gh_car(argv[1]))) && SCM_NFALSEP(scm_procedure_p(gh_cdr(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_4(argc,argv); } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_1(argc,argv); } } } } } } } scm_misc_error("meep-fields-max-abs", "No matching method for generic function `meep_fields_max_abs'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; std::complex< double > arg11 ; bool arg12 ; int arg13 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) scm_is_true(argv[9]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } { arg12 = (bool) scm_is_true(argv[11]); } { arg13 = (int) scm_to_int(argv[12]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; std::complex< double > arg11 ; bool arg12 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) scm_is_true(argv[9]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } { arg12 = (bool) scm_is_true(argv[11]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; std::complex< double > arg11 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) scm_is_true(argv[9]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) scm_is_true(argv[9]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; std::complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (bool) scm_is_true(argv[6]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_pt (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-fields-add-dft-pt" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; { arg4 = (double) scm_to_double(s_3); } { arg5 = (double) scm_to_double(s_4); } { arg6 = (int) scm_to_int(s_5); } result = (meep::dft_chunk *)(arg1)->add_dft_pt(arg2,(meep::vec const &)*arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } { arg6 = (bool) scm_is_true(argv[5]); } result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_9 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft(SCM rest) { #define FUNC_NAME "meep-fields-add-dft" SCM argv[13]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 13, "meep-fields-add-dft"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_9(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_8(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_7(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_6(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_5(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_4(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_3(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_2(argc,argv); } } } } } } } } } } } } if (argc == 12) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { { _v = SCM_BOOLP(argv[11]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_1(argc,argv); } } } } } } } } } } } } } if (argc == 13) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { { _v = SCM_BOOLP(argv[11]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[12])) && scm_is_true(scm_exact_p(argv[12]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_0(argc,argv); } } } } } } } } } } } } } } scm_misc_error("meep-fields-add-dft", "No matching method for generic function `meep_fields_add_dft'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_update_dfts (SCM s_0) { #define FUNC_NAME "meep-fields-update-dfts" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->update_dfts(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft-flux" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux_box (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-flux-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (int) scm_to_int(s_4); } result = (arg1)->add_dft_flux_box((meep::volume const &)*arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux_plane (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (int) scm_to_int(s_4); } result = (arg1)->add_dft_flux_plane((meep::volume const &)*arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft-flux" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (int) scm_to_int(argv[4]); } result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux(SCM rest) { #define FUNC_NAME "meep-fields-add-dft-flux" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-add-dft-flux"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[4])) && scm_is_true(scm_exact_p(argv[4]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft_flux__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft_flux__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-add-dft-flux", "No matching method for generic function `meep_fields_add_dft_flux'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_force (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-force" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_force > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (int) scm_to_int(s_4); } result = (arg1)->add_dft_force((meep::volume_list const *)arg2,arg3,arg4,arg5); { meep::dft_force * resultptr; resultptr = new meep::dft_force((const meep::dft_force &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_near2far (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-near2far" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_near2far > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (int) scm_to_int(s_4); } result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,arg3,arg4,arg5); { meep::dft_near2far * resultptr; resultptr = new meep::dft_near2far((const meep::dft_near2far &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_near2far, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_chi1inv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-chi1inv" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; result = (double)((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_inveps (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-get-inveps" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } { arg3 = (meep::direction) scm_to_int(s_2); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; result = (double)((meep::fields const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-get-eps" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::fields const *)arg1)->get_eps((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-get-mu" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::fields const *)arg1)->get_mu((meep::vec const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_point (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-get-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::monitor_point *arg2 = (meep::monitor_point *) 0 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::monitor_point *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__monitor_point, 2, 0); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; ((meep::fields const *)arg1)->get_point(arg2,(meep::vec const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-new-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; meep::monitor_point *arg3 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (meep::monitor_point *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__monitor_point, 3, 0); } result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-new-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point(SCM rest) { #define FUNC_NAME "meep-fields-get-new-point" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-new-point"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_fields_get_new_point__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_get_new_point__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-get-new-point", "No matching method for generic function `meep_fields_get_new_point'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(argv[2]); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands(SCM rest) { #define FUNC_NAME "meep-fields-prepare-for-bands" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-prepare-for-bands"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-prepare-for-bands", "No matching method for generic function `meep_fields_prepare_for_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_record_bands (SCM s_0) { #define FUNC_NAME "meep-fields-record-bands" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->record_bands(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-band" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (int) scm_to_int(argv[2]); } result = (arg1)->get_band(arg2,arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-band" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } result = (arg1)->get_band(arg2); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band(SCM rest) { #define FUNC_NAME "meep-fields-get-band" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-band"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_get_band__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_fields_get_band__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-get-band", "No matching method for generic function `meep_fields_get_band'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-grace-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::grace *arg2 = (meep::grace *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grace *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grace, 2, 0); } { arg3 = (int) scm_to_int(argv[2]); } (arg1)->grace_bands(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-grace-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::grace *arg2 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grace *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grace, 2, 0); } (arg1)->grace_bands(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands(SCM rest) { #define FUNC_NAME "meep-fields-grace-bands" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-grace-bands"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_grace_bands__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { return _wrap_meep_fields_grace_bands__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-grace-bands", "No matching method for generic function `meep_fields_grace_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-bands" meep::fields *arg1 = (meep::fields *) 0 ; FILE *arg2 = (FILE *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (FILE *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_FILE, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (int) scm_to_int(argv[3]); } (arg1)->output_bands(arg2,(char const *)arg3,arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-bands" meep::fields *arg1 = (meep::fields *) 0 ; FILE *arg2 = (FILE *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (FILE *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_FILE, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->output_bands(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands(SCM rest) { #define FUNC_NAME "meep-fields-output-bands" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-fields-output-bands"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_FILE, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_bands__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_FILE, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_string(argv[2]) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_meep_fields_output_bands__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-fields-output-bands", "No matching method for generic function `meep_fields_output_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_to_int(argv[1]); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = (double)((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_synchronize_magnetic_fields (SCM s_0) { #define FUNC_NAME "meep-fields-synchronize-magnetic-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->synchronize_magnetic_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_restore_magnetic_fields (SCM s_0) { #define FUNC_NAME "meep-fields-restore-magnetic-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->restore_magnetic_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-electric-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->electric_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_magnetic_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-magnetic-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->magnetic_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_thermo_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-thermo-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->thermo_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_total_energy (SCM s_0) { #define FUNC_NAME "meep-fields-total-energy" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->total_energy(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-field-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->field_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-field-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->field_energy_in_box(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box(SCM rest) { #define FUNC_NAME "meep-fields-field-energy-in-box" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-field-energy-in-box"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_field_energy_in_box__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_field_energy_in_box__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-field-energy-in-box", "No matching method for generic function `meep_fields_field_energy_in_box'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy (SCM s_0) { #define FUNC_NAME "meep-fields-field-energy" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->field_energy(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_flux_in_box_wrongH (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-flux-in-box-wrongH" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->flux_in_box_wrongH(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_flux_in_box (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-flux-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->flux_in_box(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_vol (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-add-flux-vol" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (meep::flux_vol *)(arg1)->add_flux_vol(arg2,(meep::volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::volume const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::vec const &)*arg2,(meep::vec const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane(SCM rest) { #define FUNC_NAME "meep-fields-add-flux-plane" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-add-flux-plane"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_flux_plane__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_add_flux_plane__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-add-flux-plane", "No matching method for generic function `meep_fields_add_flux_plane'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_max_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-electric-energy-max-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->electric_energy_max_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_modal_volume_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-modal-volume-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->modal_volume_in_box((meep::volume const &)*arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_sqr_weighted_integral (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-electric-sqr-weighted-integral" meep::fields *arg1 = (meep::fields *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_1, SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->electric_sqr_weighted_integral(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_weighted_integral (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-electric-energy-weighted-integral" meep::fields *arg1 = (meep::fields *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_1, SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->electric_energy_weighted_integral(arg2,(meep::volume const &)*arg3); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-set-output-directory" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-verbose" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } (arg1)->verbose(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-verbose" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->verbose(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose(SCM rest) { #define FUNC_NAME "meep-fields-verbose" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-fields-verbose"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_verbose__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_fields_verbose__SWIG_0(argc,argv); } } } scm_misc_error("meep-fields-verbose", "No matching method for generic function `meep_fields_verbose'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_count_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-count-volume" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (double)(arg1)->count_volume(arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_have_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-have-component" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(s_1); } result = (bool)(arg1)->have_component(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_eps (SCM s_0) { #define FUNC_NAME "meep-fields-max-eps" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->max_eps(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_step_boundaries (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-step-boundaries" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_to_int(s_1); } (arg1)->step_boundaries(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_nosize_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-nosize-direction" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } result = (bool)((meep::fields const *)arg1)->nosize_direction(arg2); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_normal_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-normal-direction" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (meep::direction)((meep::fields const *)arg1)->normal_direction((meep::volume const &)*arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::direction arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::field_type arg7 ; SwigValueWrapper< meep::volume > arg8 ; bool arg9 ; meep::volume *argp8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (meep::field_type) scm_to_int(argv[6]); } { argp8 = (meep::volume *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__volume, 8, 0); arg8 = *argp8; } { arg9 = (bool) scm_is_true(argv[8]); } result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::direction arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::field_type arg7 ; SwigValueWrapper< meep::volume > arg8 ; meep::volume *argp8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } { arg7 = (meep::field_type) scm_to_int(argv[6]); } { argp8 = (meep::volume *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__volume, 8, 0); arg8 = *argp8; } result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral(SCM rest) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "meep-fields-casimir-stress-dct-integral"); if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[6])) && scm_is_true(scm_exact_p(argv[6]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_casimir_stress_dct_integral__SWIG_1(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[6])) && scm_is_true(scm_exact_p(argv[6]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_casimir_stress_dct_integral__SWIG_0(argc,argv); } } } } } } } } } } scm_misc_error("meep-fields-casimir-stress-dct-integral", "No matching method for generic function `meep_fields_casimir_stress_dct_integral'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_set_solve_cw_omega (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-set-solve-cw-omega" meep::fields *arg1 = (meep::fields *) 0 ; std::complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_solve_cw_omega(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_unset_solve_cw_omega (SCM s_0) { #define FUNC_NAME "meep-fields-unset-solve-cw-omega" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->unset_solve_cw_omega(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__ivec, 3, 0); } result = ((meep::fields const *)arg1)->get_field(arg2,(meep::ivec const &)*arg3); { gswig_result = scm_make_rectangular(ctl_convert_number_to_scm((&result)->real()), ctl_convert_number_to_scm((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field(SCM rest) { #define FUNC_NAME "meep-fields-get-field" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-field"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_get_field__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-get-field", "No matching method for generic function `meep_fields_get_field'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_get_chi1inv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-chi1inv" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_to_int(argv[1]); } { arg3 = (meep::direction) scm_to_int(argv[2]); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_chi1inv(SCM rest) { #define FUNC_NAME "meep-fields-get-chi1inv" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-fields-get-chi1inv"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_get_chi1inv__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[2])) && scm_is_true(scm_exact_p(argv[2]))? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_fields_get_chi1inv__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-fields-get-chi1inv", "No matching method for generic function `meep_fields_get_chi1inv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_locate_component_point (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-locate-component-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::component *arg2 = (meep::component *) 0 ; meep::ivec *arg3 = (meep::ivec *) 0 ; std::complex< double > *arg4 = (std::complex< double > *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__component, 2, 0); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__ivec, 3, 0); } { arg4 = (std::complex< double > *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_std__complexT_double_t, 4, 0); } result = (bool)((meep::fields const *)arg1)->locate_component_point(arg2,arg3,arg4); { gswig_result = scm_from_bool(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_flux_vol (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "new-meep-flux-vol" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_to_int(s_1); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (meep::flux_vol *)new meep::flux_vol(arg1,arg2,(meep::volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_flux_vol (SCM s_0) { #define FUNC_NAME "delete-meep-flux-vol" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_update_half (SCM s_0) { #define FUNC_NAME "meep-flux-vol-update-half" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } (arg1)->update_half(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_update (SCM s_0) { #define FUNC_NAME "meep-flux-vol-update" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } (arg1)->update(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_flux (SCM s_0) { #define FUNC_NAME "meep-flux-vol-flux" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } result = (double)(arg1)->flux(); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-flux-vol-next-set" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; meep::flux_vol *arg2 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } { arg2 = (meep::flux_vol *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__flux_vol, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_next_get (SCM s_0) { #define FUNC_NAME "meep-flux-vol-next-get" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } result = (meep::flux_vol *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_type_XY(SCM s_0) { #define FUNC_NAME "meep-grace-type-XY" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_grace_type_XY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_type_ERROR_BARS(SCM s_0) { #define FUNC_NAME "meep-grace-type-ERROR-BARS" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_meep_grace_type_ERROR_BARS); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-grace" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grace *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (meep::grace *)new meep::grace((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grace, 1); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-grace" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grace *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (meep::grace *)new meep::grace((char const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grace, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace(SCM rest) { #define FUNC_NAME "new-meep-grace" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-meep-grace"); if (argc == 1) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { return _wrap_new_meep_grace__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { return _wrap_new_meep_grace__SWIG_0(argc,argv); } } } scm_misc_error("new-meep-grace", "No matching method for generic function `new_meep_grace'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_grace (SCM s_0) { #define FUNC_NAME "delete-meep-grace" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-new-set" meep::grace *arg1 = (meep::grace *) 0 ; meep::grace_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (meep::grace_type) scm_to_int(argv[1]); } (arg1)->new_set(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-new-set" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } (arg1)->new_set(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set(SCM rest) { #define FUNC_NAME "meep-grace-new-set" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grace-new-set"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grace_new_set__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { return _wrap_meep_grace_new_set__SWIG_0(argc,argv); } } } scm_misc_error("meep-grace-new-set", "No matching method for generic function `meep_grace_new_set'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grace_new_curve (SCM s_0) { #define FUNC_NAME "meep-grace-new-curve" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } (arg1)->new_curve(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_set_legend (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grace-set-legend" meep::grace *arg1 = (meep::grace *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_legend((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_set_range (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-grace-set-range" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (double) scm_to_double(s_4); } (arg1)->set_range(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } (arg1)->output_point(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->output_point(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } (arg1)->output_point(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point(SCM rest) { #define FUNC_NAME "meep-grace-output-point" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grace-output-point"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-grace-output-point", "No matching method for generic function `meep_grace_output_point'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (double) scm_to_double(argv[5]); } (arg1)->output_out_of_order(arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } (arg1)->output_out_of_order(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } (arg1)->output_out_of_order(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order(SCM rest) { #define FUNC_NAME "meep-grace-output-out-of-order" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-grace-output-out-of-order"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-grace-output-out-of-order", "No matching method for generic function `meep_grace_output_out_of_order'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-output-directory" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)meep::make_output_directory((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-output-directory" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (char *)meep::make_output_directory((char const *)arg1); { gswig_result = SWIG_str02scm((const char *)result); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory(SCM rest) { #define FUNC_NAME "meep-make-output-directory" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-make-output-directory"); if (argc == 1) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_make_output_directory__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = scm_is_string(argv[0]) ? 1 : 0; } if (_v) { { _v = scm_is_string(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_make_output_directory__SWIG_0(argc,argv); } } } scm_misc_error("meep-make-output-directory", "No matching method for generic function `meep_make_output_directory'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_trash_output_directory (SCM s_0) { #define FUNC_NAME "meep-trash-output-directory" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::trash_output_directory((char const *)arg1); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_create_output_file (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-create-output-file" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; FILE *result = 0 ; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } result = (FILE *)meep::create_output_file((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_FILE, 0); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-deal-with-ctrl-c" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(argv[0]); } meep::deal_with_ctrl_c(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-deal-with-ctrl-c" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::deal_with_ctrl_c(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c(SCM rest) { #define FUNC_NAME "meep-deal-with-ctrl-c" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-deal-with-ctrl-c"); if (argc == 0) { return _wrap_meep_deal_with_ctrl_c__SWIG_1(argc,argv); } if (argc == 1) { int _v; { _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0; } if (_v) { return _wrap_meep_deal_with_ctrl_c__SWIG_0(argc,argv); } } scm_misc_error("meep-deal-with-ctrl-c", "No matching method for generic function `meep_deal_with_ctrl_c'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_interrupt(SCM s_0) { #define FUNC_NAME "interrupt" SCM gswig_result; if (s_0 != SCM_UNDEFINED) { { meep::interrupt = (int) scm_to_int(s_0); } } { gswig_result = scm_from_long(meep::interrupt); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; double arg14 ; double arg15 ; double arg16 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { arg13 = (double) scm_to_double(argv[12]); } { arg14 = (double) scm_to_double(argv[13]); } { arg15 = (double) scm_to_double(argv[14]); } { arg16 = (double) scm_to_double(argv[15]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; double arg14 ; double arg15 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { arg13 = (double) scm_to_double(argv[12]); } { arg14 = (double) scm_to_double(argv[13]); } { arg15 = (double) scm_to_double(argv[14]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; double arg14 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { arg13 = (double) scm_to_double(argv[12]); } { arg14 = (double) scm_to_double(argv[13]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } { arg13 = (double) scm_to_double(argv[12]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } { arg12 = (double) scm_to_double(argv[11]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_to_double(argv[10]); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" std::complex< double > *arg1 = (std::complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; std::complex< double > *arg7 = (std::complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_std__complexT_double_t, 1, 0); } { arg2 = (int) scm_to_int(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (double) scm_to_double(argv[3]); } { arg5 = (double) scm_to_double(argv[4]); } { arg6 = (int) scm_to_int(argv[5]); } { arg7 = (std::complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_std__complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv(SCM rest) { #define FUNC_NAME "meep-do-harminv" SCM argv[16]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 16, "meep-do-harminv"); if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_do_harminv__SWIG_7(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_do_harminv__SWIG_6(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_5(argc,argv); } } } } } } } } } } } } if (argc == 12) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_4(argc,argv); } } } } } } } } } } } } } if (argc == 13) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_3(argc,argv); } } } } } } } } } } } } } } if (argc == 14) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_2(argc,argv); } } } } } } } } } } } } } } } if (argc == 15) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[14])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_1(argc,argv); } } } } } } } } } } } } } } } } if (argc == 16) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[5])) && scm_is_true(scm_exact_p(argv[5]))? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_std__complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = scm_is_true(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[14])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[15])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_0(argc,argv); } } } } } } } } } } } } } } } } } scm_misc_error("meep-do-harminv", "No matching method for generic function `meep_do_harminv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } { arg6 = (double) scm_to_double(argv[5]); } result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc(SCM rest) { #define FUNC_NAME "meep-make-casimir-gfunc" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-make-casimir-gfunc"); if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-make-casimir-gfunc", "No matching method for generic function `meep_make_casimir_gfunc'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc_kz (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-make-casimir-gfunc-kz" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; std::complex< double > *result = 0 ; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (meep::field_type) scm_to_int(s_3); } result = (std::complex< double > *)meep::make_casimir_gfunc_kz(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_set_random_seed (SCM s_0) { #define FUNC_NAME "meep-set-random-seed" unsigned long arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (unsigned long) scm_to_ulong(s_0); } meep::set_random_seed(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_uniform_random (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-uniform-random" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } result = (double)meep::uniform_random(arg1,arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_random (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-random" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } result = (double)meep::gaussian_random(arg1,arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_random_int (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-random-int" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_to_int(s_0); } { arg2 = (int) scm_to_int(s_1); } result = (int)meep::random_int(arg1,arg2); { gswig_result = scm_from_long(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_BesselJ (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-BesselJ" int arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (int) scm_to_int(s_0); } { arg2 = (double) scm_to_double(s_1); } result = (double)meep::BesselJ(arg1,arg2); { gswig_result = scm_from_double(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_green2d (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7) { #define FUNC_NAME "meep-green2d" std::complex< double > *arg1 = (std::complex< double > *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; meep::vec *arg6 = 0 ; meep::component arg7 ; std::complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__complexT_double_t, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (double) scm_to_double(s_4); } meep::vec vec__arg6 = vector3_to_vec(ctl_convert_vector3_to_c(s_5)); arg6 = &vec__arg6; { arg7 = (meep::component) scm_to_int(s_6); } { cnumber cnum = ctl_convert_cnumber_to_c(s_7); arg8 = std::complex(cnum.re, cnum.im); } meep::green2d(arg1,(meep::vec const &)*arg2,arg3,arg4,arg5,(meep::vec const &)*arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_green3d (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7) { #define FUNC_NAME "meep-green3d" std::complex< double > *arg1 = (std::complex< double > *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; meep::vec *arg6 = 0 ; meep::component arg7 ; std::complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (std::complex< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__complexT_double_t, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (double) scm_to_double(s_4); } meep::vec vec__arg6 = vector3_to_vec(ctl_convert_vector3_to_c(s_5)); arg6 = &vec__arg6; { arg7 = (meep::component) scm_to_int(s_6); } { cnumber cnum = ctl_convert_cnumber_to_c(s_7); arg8 = std::complex(cnum.re, cnum.im); } meep::green3d(arg1,(meep::vec const &)*arg2,arg3,arg4,arg5,(meep::vec const &)*arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_MEEP_CTL_SWIG_HPP(SCM s_0) { #define FUNC_NAME "MEEP-CTL-SWIG-HPP" SCM gswig_result; { gswig_result = scm_from_long(gswig_const_MEEP_CTL_SWIG_HPP); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_vec_to_vector3 (SCM s_0) { #define FUNC_NAME "vec-to-vector3" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; vector3 result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(s_0)); arg1 = &vec__arg1; result = vec_to_vector3((meep::vec const &)*arg1); { gswig_result = ctl_convert_vector3_to_scm(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_vector3_to_vec (SCM s_0) { #define FUNC_NAME "vector3-to-vec" vector3 arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = ctl_convert_vector3_to_c(s_0); } result = vector3_to_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_set_dimensions (SCM s_0) { #define FUNC_NAME "set-dimensions" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_to_int(s_0); } set_dimensions(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_structure (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7, SCM s_8, SCM s_9, SCM s_10, SCM s_11, SCM s_12, SCM s_13, SCM s_14, SCM s_15, SCM s_16, SCM s_17) { #define FUNC_NAME "make-structure" int arg1 ; vector3 arg2 ; vector3 arg3 ; double arg4 ; bool arg5 ; double arg6 ; int arg7 ; bool arg8 ; ctlio::geometric_object_list arg9 ; ctlio::material_type_list arg10 ; ctlio::material_type arg11 ; char *arg12 = (char *) 0 ; ctlio::pml_list arg13 ; ctlio::symmetry_list arg14 ; int arg15 ; double arg16 ; double arg17 ; double arg18 ; int must_free12 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (int) scm_to_int(s_0); } { arg2 = ctl_convert_vector3_to_c(s_1); } { arg3 = ctl_convert_vector3_to_c(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (bool) scm_is_true(s_4); } { arg6 = (double) scm_to_double(s_5); } { arg7 = (int) scm_to_int(s_6); } { arg8 = (bool) scm_is_true(s_7); } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_8); int i_t; (&arg9)->num_items = list_length(lo_t); (&arg9)->items = (new geometric_object[(&arg9)->num_items]); for (i_t = 0; i_t < (&arg9)->num_items; i_t++) { geometric_object_input(object_list_ref(lo_t, i_t), &(&arg9)->items[i_t]); } } } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_9); int i_t; (&arg10)->num_items = list_length(lo_t); (&arg10)->items = (new material_type[(&arg10)->num_items]); for (i_t = 0; i_t < (&arg10)->num_items; i_t++) { material_type_input(object_list_ref(lo_t, i_t), &(&arg10)->items[i_t]); } } } { using namespace ctlio; material_type_input(ctl_convert_object_to_c(s_10), &arg11); } { arg12 = (char *)SWIG_scm2str(s_11); must_free12 = 1; } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_12); int i_t; (&arg13)->num_items = list_length(lo_t); (&arg13)->items = (new pml[(&arg13)->num_items]); for (i_t = 0; i_t < (&arg13)->num_items; i_t++) { pml_input(object_list_ref(lo_t, i_t), &(&arg13)->items[i_t]); } } } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_13); int i_t; (&arg14)->num_items = list_length(lo_t); (&arg14)->items = (new symmetry[(&arg14)->num_items]); for (i_t = 0; i_t < (&arg14)->num_items; i_t++) { symmetry_input(object_list_ref(lo_t, i_t), &(&arg14)->items[i_t]); } } } { arg15 = (int) scm_to_int(s_14); } { arg16 = (double) scm_to_double(s_15); } { arg17 = (double) scm_to_double(s_16); } { arg18 = (double) scm_to_double(s_17); } result = (meep::structure *)make_structure(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(char const *)arg12,arg13,arg14,arg15,arg16,arg17,arg18); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 0); } if (must_free12 && arg12) SWIG_free(arg12); return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_structure_rest (SCM rest) { SCM arg[18]; SWIG_Guile_GetArgs (arg, rest, 18, 0, "make-structure"); return _wrap_make_structure(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9], arg[10], arg[11], arg[12], arg[13], arg[14], arg[15], arg[16], arg[17]); } static SCM _wrap_do_harminv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "do-harminv" ctlio::cnumber_list arg1 ; double arg2 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cvector3_list result; { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_0); int i_t; (&arg1)->num_items = list_length(lo_t); (&arg1)->items = (new cnumber[(&arg1)->num_items]); for (i_t = 0; i_t < (&arg1)->num_items; i_t++) { (&arg1)->items[i_t] = cnumber_list_ref(lo_t, i_t); } } } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (double) scm_to_double(s_3); } { arg5 = (int) scm_to_int(s_4); } result = do_harminv(arg1,arg2,arg3,arg4,arg5); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cvector3_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_flux_flux (SCM s_0) { #define FUNC_NAME "dft-flux-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::number_list result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = dft_flux_flux(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_number_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_force_force (SCM s_0) { #define FUNC_NAME "dft-force-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::number_list result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = dft_force_force(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_number_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_ldos_ldos (SCM s_0) { #define FUNC_NAME "dft-ldos-ldos" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::number_list result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = dft_ldos_ldos(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_number_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_ldos_F (SCM s_0) { #define FUNC_NAME "dft-ldos-F" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = dft_ldos_F(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_ldos_J (SCM s_0) { #define FUNC_NAME "dft-ldos-J" meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (meep::dft_ldos *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_ldos, 1, 0); } result = dft_ldos_J(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_near2far_farfield (SCM s_0, SCM s_1) { #define FUNC_NAME "dft-near2far-farfield" meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (meep::dft_near2far *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_near2far, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = dft_near2far_farfield(arg1,(meep::vec const &)*arg2); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } { arg6 = (double) scm_to_double(argv[5]); } result = make_casimir_g(arg1,arg2,arg3,arg4,arg5,arg6); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } result = make_casimir_g(arg1,arg2,arg3,arg4,arg5); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_to_double(argv[0]); } { arg2 = (double) scm_to_double(argv[1]); } { arg3 = (double) scm_to_double(argv[2]); } { arg4 = (meep::field_type) scm_to_int(argv[3]); } result = make_casimir_g(arg1,arg2,arg3,arg4); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g(SCM rest) { #define FUNC_NAME "make-casimir-g" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "make-casimir-g"); if (argc == 4) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { return _wrap_make_casimir_g__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_make_casimir_g__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { _v = scm_is_true(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = scm_is_true(scm_integer_p(argv[3])) && scm_is_true(scm_exact_p(argv[3]))? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = scm_is_true(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_make_casimir_g__SWIG_0(argc,argv); } } } } } } } scm_misc_error("make-casimir-g", "No matching method for generic function `make_casimir_g'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_make_casimir_g_kz (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "make-casimir-g-kz" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_to_double(s_0); } { arg2 = (double) scm_to_double(s_1); } { arg3 = (double) scm_to_double(s_2); } { arg4 = (meep::field_type) scm_to_int(s_3); } result = make_casimir_g_kz(arg1,arg2,arg3,arg4); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_volume_list (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "make-volume-list" meep::volume *arg1 = 0 ; int arg2 ; std::complex< double > arg3 ; meep::volume_list *arg4 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_to_int(s_1); } { cnumber cnum = ctl_convert_cnumber_to_c(s_2); arg3 = std::complex(cnum.re, cnum.im); } { arg4 = (meep::volume_list *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__volume_list, 4, 0); } result = (meep::volume_list *)make_volume_list((meep::volume const &)*arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } #ifdef __cplusplus extern "C" { #endif /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_p_meep__lorentzian_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility **) ((meep::lorentzian_susceptibility **) x)); } static void *_p_p_meep__noisy_lorentzian_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility **) (meep::lorentzian_susceptibility *) ((meep::noisy_lorentzian_susceptibility **) x)); } static void *_p_p_meep__multilevel_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility **) ((meep::multilevel_susceptibility **) x)); } static void *_p_meep__noisy_lorentzian_susceptibilityTo_p_meep__lorentzian_susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::lorentzian_susceptibility *) ((meep::noisy_lorentzian_susceptibility *) x)); } static void *_p_meep__lorentzian_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility *) ((meep::lorentzian_susceptibility *) x)); } static void *_p_meep__noisy_lorentzian_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility *) (meep::lorentzian_susceptibility *) ((meep::noisy_lorentzian_susceptibility *) x)); } static void *_p_meep__multilevel_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::susceptibility *) ((meep::multilevel_susceptibility *) x)); } static void *_p_meep__simple_material_functionTo_p_meep__material_function(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::material_function *) ((meep::simple_material_function *) x)); } static void *_p_p_meep__gaussian_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time **) ((meep::gaussian_src_time **) x)); } static void *_p_p_meep__continuous_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time **) ((meep::continuous_src_time **) x)); } static void *_p_p_meep__custom_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time **) ((meep::custom_src_time **) x)); } static void *_p_meep__gaussian_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time *) ((meep::gaussian_src_time *) x)); } static void *_p_meep__continuous_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time *) ((meep::continuous_src_time *) x)); } static void *_p_meep__custom_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((meep::src_time *) ((meep::custom_src_time *) x)); } static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_2__p_double = {"_p_a_2__p_double", "double *(*)[2]|meep::realnum *(*)[2]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_5__bool = {"_p_a_5__bool", "bool (*)[5]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_5__meep__boundary_condition = {"_p_a_5__meep__boundary_condition", "enum meep::boundary_condition (*)[5]|meep::boundary_condition (*)[5]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_5__p_double = {"_p_a_5__p_double", "double *(*)[5]|meep::realnum *(*)[5]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int = {"_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int", "int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double = {"_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double", "double **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]|meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_meep__CONNECT_COPY_1__p_int = {"_p_a_meep__CONNECT_COPY_1__p_int", "int *(*)[meep::CONNECT_COPY+1]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_access_mode = {"_p_access_mode", "access_mode *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_boundary_region_kind = {"_p_boundary_region_kind", "boundary_region_kind *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__cnumber_list = {"_p_ctlio__cnumber_list", "ctlio::cnumber_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__geometric_object_list = {"_p_ctlio__geometric_object_list", "ctlio::geometric_object_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__material_type = {"_p_ctlio__material_type", "ctlio::material_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__material_type_list = {"_p_ctlio__material_type_list", "ctlio::material_type_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__pml_list = {"_p_ctlio__pml_list", "ctlio::pml_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__symmetry_list = {"_p_ctlio__symmetry_list", "ctlio::symmetry_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "meep::realnum *|double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_double_p_void__double = {"_p_f_double_p_void__double", "double (*)(double,void *)|meep::pml_profile_func", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void = {"_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void", "void (*)(meep::fields_chunk *,int,enum meep::component,meep::ivec,meep::ivec,meep::vec,meep::vec,meep::vec,meep::vec,double,double,meep::ivec,std::complex< double >,meep::symmetry const &,int,void *)|meep::field_chunkloop", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double = {"_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double", "double (*)(std::complex< double > const *,meep::vec const &,void *)|meep::field_rfunction", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_r_q_const__meep__vec__double = {"_p_f_r_q_const__meep__vec__double", "double (*)(meep::vec const &)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_double = {"_p_long_double", "long double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__bandsdata = {"_p_meep__bandsdata", "meep::bandsdata *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__boundary_region = {"_p_meep__boundary_region", "meep::boundary_region *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__component = {"_p_meep__component", "enum meep::component *|meep::component *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__continuous_src_time = {"_p_meep__continuous_src_time", "meep::continuous_src_time *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__custom_src_time = {"_p_meep__custom_src_time", "meep::custom_src_time *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__dft_chunk = {"_p_meep__dft_chunk", "meep::dft_chunk *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__dft_flux = {"_p_meep__dft_flux", "meep::dft_flux *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__dft_force = {"_p_meep__dft_force", "meep::dft_force *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__dft_ldos = {"_p_meep__dft_ldos", "meep::dft_ldos *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__dft_near2far = {"_p_meep__dft_near2far", "meep::dft_near2far *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__fields = {"_p_meep__fields", "meep::fields *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__fields_chunk = {"_p_meep__fields_chunk", "meep::fields_chunk *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__flux_vol = {"_p_meep__flux_vol", "meep::flux_vol *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__gaussian_src_time = {"_p_meep__gaussian_src_time", "meep::gaussian_src_time *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__grace = {"_p_meep__grace", "meep::grace *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__grid_volume = {"_p_meep__grid_volume", "meep::grid_volume *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__h5file = {"_p_meep__h5file", "meep::h5file *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__initialize = {"_p_meep__initialize", "meep::initialize *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__ivec = {"_p_meep__ivec", "meep::ivec *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__lorentzian_susceptibility = {"_p_meep__lorentzian_susceptibility", "meep::lorentzian_susceptibility *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__material_function = {"_p_meep__material_function", "meep::material_function *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__monitor_point = {"_p_meep__monitor_point", "meep::monitor_point *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__multilevel_susceptibility = {"_p_meep__multilevel_susceptibility", "meep::multilevel_susceptibility *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__noisy_lorentzian_susceptibility = {"_p_meep__noisy_lorentzian_susceptibility", "meep::noisy_lorentzian_susceptibility *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__polarization_state_s = {"_p_meep__polarization_state_s", "meep::polarization_state_s *|meep::polarization_state *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__signed_direction = {"_p_meep__signed_direction", "meep::signed_direction *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__simple_material_function = {"_p_meep__simple_material_function", "meep::simple_material_function *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__src_time = {"_p_meep__src_time", "meep::src_time *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__structure = {"_p_meep__structure", "meep::structure *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__structure_chunk = {"_p_meep__structure_chunk", "meep::structure_chunk *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__susceptibility = {"_p_meep__susceptibility", "meep::susceptibility *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__symmetry = {"_p_meep__symmetry", "meep::symmetry *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__vec = {"_p_meep__vec", "meep::vec *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__volume = {"_p_meep__volume", "meep::volume *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__volume_list = {"_p_meep__volume_list", "meep::volume_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_double = {"_p_p_double", "meep::realnum **|double **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__fields_chunk = {"_p_p_meep__fields_chunk", "meep::fields_chunk **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__polarization_state_s = {"_p_p_meep__polarization_state_s", "meep::polarization_state **|meep::polarization_state_s **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__src_time = {"_p_p_meep__src_time", "meep::src_time **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__gaussian_src_time = {"_p_p_meep__gaussian_src_time", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_meep__continuous_src_time = {"_p_p_meep__continuous_src_time", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_meep__custom_src_time = {"_p_p_meep__custom_src_time", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_meep__src_vol = {"_p_p_meep__src_vol", "meep::src_vol **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__structure_chunk = {"_p_p_meep__structure_chunk", "meep::structure_chunk **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__susceptibility = {"_p_p_meep__susceptibility", "meep::susceptibility **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__lorentzian_susceptibility = {"_p_p_meep__lorentzian_susceptibility", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_meep__noisy_lorentzian_susceptibility = {"_p_p_meep__noisy_lorentzian_susceptibility", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_meep__multilevel_susceptibility = {"_p_p_meep__multilevel_susceptibility", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_p_double = {"_p_p_p_double", "meep::realnum ***|double ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_std__complexT_double_t = {"_p_p_std__complexT_double_t", "std::complex< meep::realnum > **|std::complex< double > **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "std::complex< meep::realnum > *|std::complex< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__complexT_float_t = {"_p_std__complexT_float_t", "std::complex< float > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__complexT_long_double_t = {"_p_std__complexT_long_double_t", "std::complex< long double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "SCM *|unsigned long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vector3 = {"_p_vector3", "vector3 *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_FILE, &_swigt__p_a_2__p_double, &_swigt__p_a_5__bool, &_swigt__p_a_5__meep__boundary_condition, &_swigt__p_a_5__p_double, &_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, &_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, &_swigt__p_a_meep__CONNECT_COPY_1__p_int, &_swigt__p_access_mode, &_swigt__p_boundary_region_kind, &_swigt__p_ctlio__cnumber_list, &_swigt__p_ctlio__geometric_object_list, &_swigt__p_ctlio__material_type, &_swigt__p_ctlio__material_type_list, &_swigt__p_ctlio__pml_list, &_swigt__p_ctlio__symmetry_list, &_swigt__p_double, &_swigt__p_f_double_p_void__double, &_swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, &_swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, &_swigt__p_f_r_q_const__meep__vec__double, &_swigt__p_float, &_swigt__p_int, &_swigt__p_long_double, &_swigt__p_meep__bandsdata, &_swigt__p_meep__boundary_region, &_swigt__p_meep__component, &_swigt__p_meep__continuous_src_time, &_swigt__p_meep__custom_src_time, &_swigt__p_meep__dft_chunk, &_swigt__p_meep__dft_flux, &_swigt__p_meep__dft_force, &_swigt__p_meep__dft_ldos, &_swigt__p_meep__dft_near2far, &_swigt__p_meep__fields, &_swigt__p_meep__fields_chunk, &_swigt__p_meep__flux_vol, &_swigt__p_meep__gaussian_src_time, &_swigt__p_meep__grace, &_swigt__p_meep__grid_volume, &_swigt__p_meep__h5file, &_swigt__p_meep__initialize, &_swigt__p_meep__ivec, &_swigt__p_meep__lorentzian_susceptibility, &_swigt__p_meep__material_function, &_swigt__p_meep__monitor_point, &_swigt__p_meep__multilevel_susceptibility, &_swigt__p_meep__noisy_lorentzian_susceptibility, &_swigt__p_meep__polarization_state_s, &_swigt__p_meep__signed_direction, &_swigt__p_meep__simple_material_function, &_swigt__p_meep__src_time, &_swigt__p_meep__structure, &_swigt__p_meep__structure_chunk, &_swigt__p_meep__susceptibility, &_swigt__p_meep__symmetry, &_swigt__p_meep__vec, &_swigt__p_meep__volume, &_swigt__p_meep__volume_list, &_swigt__p_p_double, &_swigt__p_p_meep__continuous_src_time, &_swigt__p_p_meep__custom_src_time, &_swigt__p_p_meep__fields_chunk, &_swigt__p_p_meep__gaussian_src_time, &_swigt__p_p_meep__lorentzian_susceptibility, &_swigt__p_p_meep__multilevel_susceptibility, &_swigt__p_p_meep__noisy_lorentzian_susceptibility, &_swigt__p_p_meep__polarization_state_s, &_swigt__p_p_meep__src_time, &_swigt__p_p_meep__src_vol, &_swigt__p_p_meep__structure_chunk, &_swigt__p_p_meep__susceptibility, &_swigt__p_p_p_char, &_swigt__p_p_p_double, &_swigt__p_p_std__complexT_double_t, &_swigt__p_std__complexT_double_t, &_swigt__p_std__complexT_float_t, &_swigt__p_std__complexT_long_double_t, &_swigt__p_unsigned_long, &_swigt__p_vector3, &_swigt__p_void, }; static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_2__p_double[] = { {&_swigt__p_a_2__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_5__bool[] = { {&_swigt__p_a_5__bool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_5__meep__boundary_condition[] = { {&_swigt__p_a_5__meep__boundary_condition, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_5__p_double[] = { {&_swigt__p_a_5__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_meep__CONNECT_COPY_1__p_int[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_access_mode[] = { {&_swigt__p_access_mode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_boundary_region_kind[] = { {&_swigt__p_boundary_region_kind, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__cnumber_list[] = { {&_swigt__p_ctlio__cnumber_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__geometric_object_list[] = { {&_swigt__p_ctlio__geometric_object_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__material_type[] = { {&_swigt__p_ctlio__material_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__material_type_list[] = { {&_swigt__p_ctlio__material_type_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__pml_list[] = { {&_swigt__p_ctlio__pml_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__symmetry_list[] = { {&_swigt__p_ctlio__symmetry_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_double_p_void__double[] = { {&_swigt__p_f_double_p_void__double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void[] = { {&_swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double[] = { {&_swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_r_q_const__meep__vec__double[] = { {&_swigt__p_f_r_q_const__meep__vec__double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_double[] = { {&_swigt__p_long_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__bandsdata[] = { {&_swigt__p_meep__bandsdata, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__boundary_region[] = { {&_swigt__p_meep__boundary_region, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__component[] = { {&_swigt__p_meep__component, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__continuous_src_time[] = { {&_swigt__p_meep__continuous_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__custom_src_time[] = { {&_swigt__p_meep__custom_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__dft_chunk[] = { {&_swigt__p_meep__dft_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__dft_flux[] = { {&_swigt__p_meep__dft_flux, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__dft_force[] = { {&_swigt__p_meep__dft_force, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__dft_ldos[] = { {&_swigt__p_meep__dft_ldos, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__dft_near2far[] = { {&_swigt__p_meep__dft_near2far, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__fields[] = { {&_swigt__p_meep__fields, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__fields_chunk[] = { {&_swigt__p_meep__fields_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__flux_vol[] = { {&_swigt__p_meep__flux_vol, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__gaussian_src_time[] = { {&_swigt__p_meep__gaussian_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__grace[] = { {&_swigt__p_meep__grace, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__grid_volume[] = { {&_swigt__p_meep__grid_volume, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__h5file[] = { {&_swigt__p_meep__h5file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__initialize[] = { {&_swigt__p_meep__initialize, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__ivec[] = { {&_swigt__p_meep__ivec, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__lorentzian_susceptibility[] = { {&_swigt__p_meep__lorentzian_susceptibility, 0, 0, 0}, {&_swigt__p_meep__noisy_lorentzian_susceptibility, _p_meep__noisy_lorentzian_susceptibilityTo_p_meep__lorentzian_susceptibility, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__material_function[] = { {&_swigt__p_meep__material_function, 0, 0, 0}, {&_swigt__p_meep__simple_material_function, _p_meep__simple_material_functionTo_p_meep__material_function, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__monitor_point[] = { {&_swigt__p_meep__monitor_point, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__multilevel_susceptibility[] = { {&_swigt__p_meep__multilevel_susceptibility, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__noisy_lorentzian_susceptibility[] = { {&_swigt__p_meep__noisy_lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__polarization_state_s[] = { {&_swigt__p_meep__polarization_state_s, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__signed_direction[] = { {&_swigt__p_meep__signed_direction, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__simple_material_function[] = { {&_swigt__p_meep__simple_material_function, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__src_time[] = { {&_swigt__p_meep__src_time, 0, 0, 0}, {&_swigt__p_meep__gaussian_src_time, _p_meep__gaussian_src_timeTo_p_meep__src_time, 0, 0}, {&_swigt__p_meep__continuous_src_time, _p_meep__continuous_src_timeTo_p_meep__src_time, 0, 0}, {&_swigt__p_meep__custom_src_time, _p_meep__custom_src_timeTo_p_meep__src_time, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__structure[] = { {&_swigt__p_meep__structure, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__structure_chunk[] = { {&_swigt__p_meep__structure_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__susceptibility[] = { {&_swigt__p_meep__susceptibility, 0, 0, 0}, {&_swigt__p_meep__lorentzian_susceptibility, _p_meep__lorentzian_susceptibilityTo_p_meep__susceptibility, 0, 0}, {&_swigt__p_meep__noisy_lorentzian_susceptibility, _p_meep__noisy_lorentzian_susceptibilityTo_p_meep__susceptibility, 0, 0}, {&_swigt__p_meep__multilevel_susceptibility, _p_meep__multilevel_susceptibilityTo_p_meep__susceptibility, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__symmetry[] = { {&_swigt__p_meep__symmetry, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__vec[] = { {&_swigt__p_meep__vec, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__volume[] = { {&_swigt__p_meep__volume, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__volume_list[] = { {&_swigt__p_meep__volume_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__fields_chunk[] = { {&_swigt__p_p_meep__fields_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__polarization_state_s[] = { {&_swigt__p_p_meep__polarization_state_s, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__gaussian_src_time[] = {{&_swigt__p_p_meep__gaussian_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__continuous_src_time[] = {{&_swigt__p_p_meep__continuous_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__custom_src_time[] = {{&_swigt__p_p_meep__custom_src_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__src_time[] = { {&_swigt__p_p_meep__src_time, 0, 0, 0}, {&_swigt__p_p_meep__gaussian_src_time, _p_p_meep__gaussian_src_timeTo_p_p_meep__src_time, 0, 0}, {&_swigt__p_p_meep__continuous_src_time, _p_p_meep__continuous_src_timeTo_p_p_meep__src_time, 0, 0}, {&_swigt__p_p_meep__custom_src_time, _p_p_meep__custom_src_timeTo_p_p_meep__src_time, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__src_vol[] = { {&_swigt__p_p_meep__src_vol, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__structure_chunk[] = { {&_swigt__p_p_meep__structure_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__lorentzian_susceptibility[] = {{&_swigt__p_p_meep__lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__noisy_lorentzian_susceptibility[] = {{&_swigt__p_p_meep__noisy_lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__multilevel_susceptibility[] = {{&_swigt__p_p_meep__multilevel_susceptibility, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__susceptibility[] = { {&_swigt__p_p_meep__susceptibility, 0, 0, 0}, {&_swigt__p_p_meep__lorentzian_susceptibility, _p_p_meep__lorentzian_susceptibilityTo_p_p_meep__susceptibility, 0, 0}, {&_swigt__p_p_meep__noisy_lorentzian_susceptibility, _p_p_meep__noisy_lorentzian_susceptibilityTo_p_p_meep__susceptibility, 0, 0}, {&_swigt__p_p_meep__multilevel_susceptibility, _p_p_meep__multilevel_susceptibilityTo_p_p_meep__susceptibility, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_double[] = { {&_swigt__p_p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_std__complexT_double_t[] = { {&_swigt__p_p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__complexT_double_t[] = { {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__complexT_float_t[] = { {&_swigt__p_std__complexT_float_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__complexT_long_double_t[] = { {&_swigt__p_std__complexT_long_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vector3[] = { {&_swigt__p_vector3, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_FILE, _swigc__p_a_2__p_double, _swigc__p_a_5__bool, _swigc__p_a_5__meep__boundary_condition, _swigc__p_a_5__p_double, _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, _swigc__p_a_meep__CONNECT_COPY_1__p_int, _swigc__p_access_mode, _swigc__p_boundary_region_kind, _swigc__p_ctlio__cnumber_list, _swigc__p_ctlio__geometric_object_list, _swigc__p_ctlio__material_type, _swigc__p_ctlio__material_type_list, _swigc__p_ctlio__pml_list, _swigc__p_ctlio__symmetry_list, _swigc__p_double, _swigc__p_f_double_p_void__double, _swigc__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, _swigc__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, _swigc__p_f_r_q_const__meep__vec__double, _swigc__p_float, _swigc__p_int, _swigc__p_long_double, _swigc__p_meep__bandsdata, _swigc__p_meep__boundary_region, _swigc__p_meep__component, _swigc__p_meep__continuous_src_time, _swigc__p_meep__custom_src_time, _swigc__p_meep__dft_chunk, _swigc__p_meep__dft_flux, _swigc__p_meep__dft_force, _swigc__p_meep__dft_ldos, _swigc__p_meep__dft_near2far, _swigc__p_meep__fields, _swigc__p_meep__fields_chunk, _swigc__p_meep__flux_vol, _swigc__p_meep__gaussian_src_time, _swigc__p_meep__grace, _swigc__p_meep__grid_volume, _swigc__p_meep__h5file, _swigc__p_meep__initialize, _swigc__p_meep__ivec, _swigc__p_meep__lorentzian_susceptibility, _swigc__p_meep__material_function, _swigc__p_meep__monitor_point, _swigc__p_meep__multilevel_susceptibility, _swigc__p_meep__noisy_lorentzian_susceptibility, _swigc__p_meep__polarization_state_s, _swigc__p_meep__signed_direction, _swigc__p_meep__simple_material_function, _swigc__p_meep__src_time, _swigc__p_meep__structure, _swigc__p_meep__structure_chunk, _swigc__p_meep__susceptibility, _swigc__p_meep__symmetry, _swigc__p_meep__vec, _swigc__p_meep__volume, _swigc__p_meep__volume_list, _swigc__p_p_double, _swigc__p_p_meep__continuous_src_time, _swigc__p_p_meep__custom_src_time, _swigc__p_p_meep__fields_chunk, _swigc__p_p_meep__gaussian_src_time, _swigc__p_p_meep__lorentzian_susceptibility, _swigc__p_p_meep__multilevel_susceptibility, _swigc__p_p_meep__noisy_lorentzian_susceptibility, _swigc__p_p_meep__polarization_state_s, _swigc__p_p_meep__src_time, _swigc__p_p_meep__src_vol, _swigc__p_p_meep__structure_chunk, _swigc__p_p_meep__susceptibility, _swigc__p_p_p_char, _swigc__p_p_p_double, _swigc__p_p_std__complexT_double_t, _swigc__p_std__complexT_double_t, _swigc__p_std__complexT_float_t, _swigc__p_std__complexT_long_double_t, _swigc__p_unsigned_long, _swigc__p_vector3, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpreters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif SWIG_GUILE_INIT_STATIC void SWIG_init(void) { SWIG_InitializeModule(0); SWIG_PropagateClientData(); scm_c_define_gsubr("NUM-FIELD-COMPONENTS", 0, 0, 0, (swig_guile_proc) _wrap_NUM_FIELD_COMPONENTS); scm_c_define_gsubr("NUM-FIELD-TYPES", 0, 0, 0, (swig_guile_proc) _wrap_NUM_FIELD_TYPES); scm_c_define_gsubr("meep-component-Ex", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ex); scm_c_define_gsubr("meep-component-Ey", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ey); scm_c_define_gsubr("meep-component-Er", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Er); scm_c_define_gsubr("meep-component-Ep", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ep); scm_c_define_gsubr("meep-component-Ez", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ez); scm_c_define_gsubr("meep-component-Hx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hx); scm_c_define_gsubr("meep-component-Hy", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hy); scm_c_define_gsubr("meep-component-Hr", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hr); scm_c_define_gsubr("meep-component-Hp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hp); scm_c_define_gsubr("meep-component-Hz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hz); scm_c_define_gsubr("meep-component-Dx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dx); scm_c_define_gsubr("meep-component-Dy", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dy); scm_c_define_gsubr("meep-component-Dr", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dr); scm_c_define_gsubr("meep-component-Dp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dp); scm_c_define_gsubr("meep-component-Dz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dz); scm_c_define_gsubr("meep-component-Bx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bx); scm_c_define_gsubr("meep-component-By", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_By); scm_c_define_gsubr("meep-component-Br", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Br); scm_c_define_gsubr("meep-component-Bp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bp); scm_c_define_gsubr("meep-component-Bz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bz); scm_c_define_gsubr("meep-component-Dielectric", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dielectric); scm_c_define_gsubr("meep-component-Permeability", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Permeability); scm_c_define_gsubr("meep-derived-component-Sx", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sx); scm_c_define_gsubr("meep-derived-component-Sy", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sy); scm_c_define_gsubr("meep-derived-component-Sr", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sr); scm_c_define_gsubr("meep-derived-component-Sp", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sp); scm_c_define_gsubr("meep-derived-component-Sz", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sz); scm_c_define_gsubr("meep-derived-component-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_EnergyDensity); scm_c_define_gsubr("meep-derived-component-D-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_D_EnergyDensity); scm_c_define_gsubr("meep-derived-component-H-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_H_EnergyDensity); scm_c_define_gsubr("meep-ndim-D1", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D1); scm_c_define_gsubr("meep-ndim-D2", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D2); scm_c_define_gsubr("meep-ndim-D3", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D3); scm_c_define_gsubr("meep-ndim-Dcyl", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_Dcyl); scm_c_define_gsubr("meep-field-type-E-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_E_stuff); scm_c_define_gsubr("meep-field-type-H-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_H_stuff); scm_c_define_gsubr("meep-field-type-D-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_D_stuff); scm_c_define_gsubr("meep-field-type-B-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_B_stuff); scm_c_define_gsubr("meep-field-type-PE-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_PE_stuff); scm_c_define_gsubr("meep-field-type-PH-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_PH_stuff); scm_c_define_gsubr("meep-field-type-WE-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_WE_stuff); scm_c_define_gsubr("meep-field-type-WH-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_WH_stuff); scm_c_define_gsubr("meep-boundary-side-High", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_side_High); scm_c_define_gsubr("meep-boundary-side-Low", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_side_Low); scm_c_define_gsubr("meep-direction-X", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_X); scm_c_define_gsubr("meep-direction-Y", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_Y); scm_c_define_gsubr("meep-direction-Z", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_Z); scm_c_define_gsubr("meep-direction-R", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_R); scm_c_define_gsubr("meep-direction-P", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_P); scm_c_define_gsubr("meep-direction-NO-DIRECTION", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_NO_DIRECTION); SWIG_TypeClientData(SWIGTYPE_p_meep__signed_direction, (void *) &_swig_guile_clientdatasigned_direction); scm_c_define_gsubr("new-signed-direction", 0, 0, 1, (swig_guile_proc) _wrap_new_signed_direction); scm_c_define_gsubr("signed-direction-d-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_d_set); scm_c_define_gsubr("signed-direction-d-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_d_get); scm_c_define_gsubr("signed-direction-flipped-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_flipped_set); scm_c_define_gsubr("signed-direction-flipped-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_flipped_get); scm_c_define_gsubr("signed-direction-phase-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_phase_set); scm_c_define_gsubr("signed-direction-phase-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_phase_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__signed_direction->clientdata))->destroy = (guile_destructor) _wrap_delete_signed_direction; scm_c_define_gsubr("delete-signed-direction", 1, 0, 0, (swig_guile_proc) _wrap_delete_signed_direction); scm_c_define_gsubr("meep-number-of-directions", 1, 0, 0, (swig_guile_proc) _wrap_meep_number_of_directions); scm_c_define_gsubr("meep-start-at-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_start_at_direction); scm_c_define_gsubr("meep-stop-at-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_stop_at_direction); scm_c_define_gsubr("meep-first-field-component", 1, 0, 0, (swig_guile_proc) _wrap_meep_first_field_component); scm_c_define_gsubr("meep-flip", 1, 0, 0, (swig_guile_proc) _wrap_meep_flip); scm_c_define_gsubr("meep-has-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_has_direction); scm_c_define_gsubr("meep-has-field-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_has_field_direction); scm_c_define_gsubr("meep-is-tm", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_tm); scm_c_define_gsubr("meep-abort", 1, 0, 0, (swig_guile_proc) _wrap_meep_abort); scm_c_define_gsubr("meep-is-electric", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_electric); scm_c_define_gsubr("meep-is-magnetic", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_magnetic); scm_c_define_gsubr("meep-is-D", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_D); scm_c_define_gsubr("meep-is-B", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_B); scm_c_define_gsubr("meep-is-derived", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_derived); scm_c_define_gsubr("meep-is-poynting", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_poynting); scm_c_define_gsubr("meep-is-energydensity", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_energydensity); scm_c_define_gsubr("meep-type", 1, 0, 0, (swig_guile_proc) _wrap_meep_type); scm_c_define_gsubr("meep-component-name", 0, 0, 1, (swig_guile_proc) _wrap_meep_component_name); scm_c_define_gsubr("meep-direction-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_direction_name); scm_c_define_gsubr("meep-dimension-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_dimension_name); scm_c_define_gsubr("meep-component-index", 1, 0, 0, (swig_guile_proc) _wrap_meep_component_index); scm_c_define_gsubr("meep-component-direction", 0, 0, 1, (swig_guile_proc) _wrap_meep_component_direction); scm_c_define_gsubr("meep-direction-component", 0, 0, 1, (swig_guile_proc) _wrap_meep_direction_component); scm_c_define_gsubr("meep-field-type-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_field_type_component); scm_c_define_gsubr("meep-coordinate-mismatch", 0, 0, 1, (swig_guile_proc) _wrap_meep_coordinate_mismatch); scm_c_define_gsubr("meep-cycle-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_cycle_direction); scm_c_define_gsubr("meep-cycle-component", 3, 0, 0, (swig_guile_proc) _wrap_meep_cycle_component); scm_c_define_gsubr("meep-veccyl", 2, 0, 0, (swig_guile_proc) _wrap_meep_veccyl); scm_c_define_gsubr("meep-zero-vec", 1, 0, 0, (swig_guile_proc) _wrap_meep_zero_vec); SWIG_TypeClientData(SWIGTYPE_p_meep__vec, (void *) &_swig_guile_clientdatameep_vec); scm_c_define_gsubr("new-meep-vec", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_vec); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__vec->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_vec; scm_c_define_gsubr("delete-meep-vec", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_vec); scm_c_define_gsubr("meep-vec-round-float", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_round_float); scm_c_define_gsubr("meep-vec-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_vec_dim_set); scm_c_define_gsubr("meep-vec-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_dim_get); scm_c_define_gsubr("meep-vec-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_r); scm_c_define_gsubr("meep-vec-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_x); scm_c_define_gsubr("meep-vec-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_y); scm_c_define_gsubr("meep-vec-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_z); scm_c_define_gsubr("meep-vec-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_vec_in_direction); scm_c_define_gsubr("meep-vec-set-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_vec_set_direction); scm_c_define_gsubr("meep-vec-project-to-boundary", 3, 0, 0, (swig_guile_proc) _wrap_meep_vec_project_to_boundary); scm_c_define_gsubr("meep-one-vec", 1, 0, 0, (swig_guile_proc) _wrap_meep_one_vec); scm_c_define_gsubr("meep-abs", 1, 0, 0, (swig_guile_proc) _wrap_meep_abs); scm_c_define_gsubr("meep-unit-vec", 2, 0, 0, (swig_guile_proc) _wrap_meep_unit_vec); scm_c_define_gsubr("meep-clean-vec", 0, 0, 1, (swig_guile_proc) _wrap_meep_clean_vec); scm_c_define_gsubr("meep-iveccyl", 2, 0, 0, (swig_guile_proc) _wrap_meep_iveccyl); scm_c_define_gsubr("meep-zero-ivec", 1, 0, 0, (swig_guile_proc) _wrap_meep_zero_ivec); scm_c_define_gsubr("meep-one-ivec", 1, 0, 0, (swig_guile_proc) _wrap_meep_one_ivec); SWIG_TypeClientData(SWIGTYPE_p_meep__ivec, (void *) &_swig_guile_clientdatameep_ivec); scm_c_define_gsubr("new-meep-ivec", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_ivec); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__ivec->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_ivec; scm_c_define_gsubr("delete-meep-ivec", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_ivec); scm_c_define_gsubr("meep-ivec-yucky-val", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_yucky_val); scm_c_define_gsubr("meep-ivec-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_dim_set); scm_c_define_gsubr("meep-ivec-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_dim_get); scm_c_define_gsubr("meep-ivec-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_r); scm_c_define_gsubr("meep-ivec-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_x); scm_c_define_gsubr("meep-ivec-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_y); scm_c_define_gsubr("meep-ivec-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_z); scm_c_define_gsubr("meep-ivec-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_in_direction); scm_c_define_gsubr("meep-ivec-set-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_ivec_set_direction); scm_c_define_gsubr("meep-ivec-round-up-to-even", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_round_up_to_even); scm_c_define_gsubr("meep-unit-ivec", 2, 0, 0, (swig_guile_proc) _wrap_meep_unit_ivec); scm_c_define_gsubr("meep-max", 0, 0, 1, (swig_guile_proc) _wrap_meep_max); scm_c_define_gsubr("meep-min", 0, 0, 1, (swig_guile_proc) _wrap_meep_min); SWIG_TypeClientData(SWIGTYPE_p_meep__volume, (void *) &_swig_guile_clientdatameep_volume); scm_c_define_gsubr("meep-volume-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_dim_set); scm_c_define_gsubr("meep-volume-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_dim_get); scm_c_define_gsubr("new-meep-volume", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_volume); scm_c_define_gsubr("meep-volume-set-direction-min", 3, 0, 0, (swig_guile_proc) _wrap_meep_volume_set_direction_min); scm_c_define_gsubr("meep-volume-set-direction-max", 3, 0, 0, (swig_guile_proc) _wrap_meep_volume_set_direction_max); scm_c_define_gsubr("meep-volume-in-direction-min", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction_min); scm_c_define_gsubr("meep-volume-in-direction-max", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction_max); scm_c_define_gsubr("meep-volume-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction); scm_c_define_gsubr("meep-volume-computational-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_computational_volume); scm_c_define_gsubr("meep-volume-integral-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_integral_volume); scm_c_define_gsubr("meep-volume-full-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_full_volume); scm_c_define_gsubr("meep-volume-center", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_center); scm_c_define_gsubr("meep-volume-diameter", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_diameter); scm_c_define_gsubr("meep-volume-contains", 0, 0, 1, (swig_guile_proc) _wrap_meep_volume_contains); scm_c_define_gsubr("meep-volume-intersect-with", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_intersect_with); scm_c_define_gsubr("meep-volume-round-float", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_round_float); scm_c_define_gsubr("meep-volume-intersects", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_intersects); scm_c_define_gsubr("meep-volume-get-min-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_get_min_corner); scm_c_define_gsubr("meep-volume-get-max-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_get_max_corner); scm_c_define_gsubr("meep-volume-normal-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_normal_direction); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__volume->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_volume; scm_c_define_gsubr("delete-meep-volume", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_volume); scm_c_define_gsubr("meep-volcyl", 3, 0, 0, (swig_guile_proc) _wrap_meep_volcyl); scm_c_define_gsubr("meep-volone", 2, 0, 0, (swig_guile_proc) _wrap_meep_volone); scm_c_define_gsubr("meep-vol1d", 2, 0, 0, (swig_guile_proc) _wrap_meep_vol1d); scm_c_define_gsubr("meep-voltwo", 3, 0, 0, (swig_guile_proc) _wrap_meep_voltwo); scm_c_define_gsubr("meep-vol2d", 3, 0, 0, (swig_guile_proc) _wrap_meep_vol2d); scm_c_define_gsubr("meep-vol3d", 4, 0, 0, (swig_guile_proc) _wrap_meep_vol3d); SWIG_TypeClientData(SWIGTYPE_p_meep__grid_volume, (void *) &_swig_guile_clientdatameep_grid_volume); scm_c_define_gsubr("new-meep-grid-volume", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_grid_volume); scm_c_define_gsubr("meep-grid-volume-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dim_set); scm_c_define_gsubr("meep-grid-volume-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dim_get); scm_c_define_gsubr("meep-grid-volume-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_a_set); scm_c_define_gsubr("meep-grid-volume-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_a_get); scm_c_define_gsubr("meep-grid-volume-inva-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_inva_set); scm_c_define_gsubr("meep-grid-volume-inva-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_inva_get); scm_c_define_gsubr("meep-grid-volume-print", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_print); scm_c_define_gsubr("meep-grid-volume-stride", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_stride); scm_c_define_gsubr("meep-grid-volume-num-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_num_direction); scm_c_define_gsubr("meep-grid-volume-yucky-num", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yucky_num); scm_c_define_gsubr("meep-grid-volume-yucky-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yucky_direction); scm_c_define_gsubr("meep-grid-volume-set-num-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_set_num_direction); scm_c_define_gsubr("meep-grid-volume-nr", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nr); scm_c_define_gsubr("meep-grid-volume-nx", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nx); scm_c_define_gsubr("meep-grid-volume-ny", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ny); scm_c_define_gsubr("meep-grid-volume-nz", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nz); scm_c_define_gsubr("meep-grid-volume-has-field", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_has_field); scm_c_define_gsubr("meep-grid-volume-has-boundary", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_has_boundary); scm_c_define_gsubr("meep-grid-volume-dr", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dr); scm_c_define_gsubr("meep-grid-volume-dx", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dx); scm_c_define_gsubr("meep-grid-volume-dy", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dy); scm_c_define_gsubr("meep-grid-volume-dz", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dz); scm_c_define_gsubr("meep-grid-volume-ntot", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ntot); scm_c_define_gsubr("meep-grid-volume-nowned-min", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nowned_min); scm_c_define_gsubr("meep-grid-volume-nowned", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nowned); scm_c_define_gsubr("meep-grid-volume-index", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_index); scm_c_define_gsubr("meep-grid-volume-round-vec", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_round_vec); scm_c_define_gsubr("meep-grid-volume-interpolate", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_interpolate); scm_c_define_gsubr("meep-grid-volume-dV", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_dV); scm_c_define_gsubr("meep-grid-volume-intersect-with", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_intersect_with); scm_c_define_gsubr("meep-grid-volume-rmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_rmin); scm_c_define_gsubr("meep-grid-volume-rmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_rmax); scm_c_define_gsubr("meep-grid-volume-xmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_xmin); scm_c_define_gsubr("meep-grid-volume-xmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_xmax); scm_c_define_gsubr("meep-grid-volume-ymin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ymin); scm_c_define_gsubr("meep-grid-volume-ymax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ymax); scm_c_define_gsubr("meep-grid-volume-zmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_zmin); scm_c_define_gsubr("meep-grid-volume-zmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_zmax); scm_c_define_gsubr("meep-grid-volume-center", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_center); scm_c_define_gsubr("meep-grid-volume-icenter", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_icenter); scm_c_define_gsubr("meep-grid-volume-loc", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_loc); scm_c_define_gsubr("meep-grid-volume-loc-at-resolution", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_loc_at_resolution); scm_c_define_gsubr("meep-grid-volume-ntot-at-resolution", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ntot_at_resolution); scm_c_define_gsubr("meep-grid-volume-iloc", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iloc); scm_c_define_gsubr("meep-grid-volume-yee-index", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee_index); scm_c_define_gsubr("meep-grid-volume-yee-shift", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee_shift); scm_c_define_gsubr("meep-grid-volume-eps-component", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_eps_component); scm_c_define_gsubr("meep-grid-volume-yee2cent-offsets", 4, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee2cent_offsets); scm_c_define_gsubr("meep-grid-volume-cent2yee-offsets", 4, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_cent2yee_offsets); scm_c_define_gsubr("meep-grid-volume-boundary-location", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_boundary_location); scm_c_define_gsubr("meep-grid-volume-big-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_big_corner); scm_c_define_gsubr("meep-grid-volume-little-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_corner); scm_c_define_gsubr("meep-grid-volume-corner", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_corner); scm_c_define_gsubr("meep-grid-volume-contains", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_contains); scm_c_define_gsubr("meep-grid-volume-little-owned-corner0", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_owned_corner0); scm_c_define_gsubr("meep-grid-volume-little-owned-corner", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_owned_corner); scm_c_define_gsubr("meep-grid-volume-owns", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_owns); scm_c_define_gsubr("meep-grid-volume-surroundings", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_surroundings); scm_c_define_gsubr("meep-grid-volume-interior", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_interior); scm_c_define_gsubr("meep-grid-volume-get-boundary-icorners", 5, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_get_boundary_icorners); scm_c_define_gsubr("meep-grid-volume-split", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_split); scm_c_define_gsubr("meep-grid-volume-split-by-effort", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_split_by_effort); scm_c_define_gsubr("meep-grid-volume-split-at-fraction", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_split_at_fraction); scm_c_define_gsubr("meep-grid-volume-halve", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_halve); scm_c_define_gsubr("meep-grid-volume-pad-self", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_pad_self); scm_c_define_gsubr("meep-grid-volume-pad", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_pad); scm_c_define_gsubr("meep-grid-volume-iyee-shift", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iyee_shift); scm_c_define_gsubr("meep-grid-volume-get-origin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_get_origin); scm_c_define_gsubr("meep-grid-volume-shift-origin", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_shift_origin); scm_c_define_gsubr("meep-grid-volume-set-origin", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_set_origin); scm_c_define_gsubr("meep-grid-volume-center-origin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_center_origin); scm_c_define_gsubr("meep-grid-volume-origin-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_in_direction); scm_c_define_gsubr("meep-grid-volume-iorigin-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iorigin_in_direction); scm_c_define_gsubr("meep-grid-volume-origin-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_r); scm_c_define_gsubr("meep-grid-volume-origin-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_x); scm_c_define_gsubr("meep-grid-volume-origin-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_y); scm_c_define_gsubr("meep-grid-volume-origin-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_z); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__grid_volume->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_grid_volume; scm_c_define_gsubr("delete-meep-grid-volume", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_grid_volume); scm_c_define_gsubr("meep-identity", 0, 0, 0, (swig_guile_proc) _wrap_meep_identity); scm_c_define_gsubr("meep-rotate4", 2, 0, 0, (swig_guile_proc) _wrap_meep_rotate4); scm_c_define_gsubr("meep-rotate2", 2, 0, 0, (swig_guile_proc) _wrap_meep_rotate2); scm_c_define_gsubr("meep-mirror", 2, 0, 0, (swig_guile_proc) _wrap_meep_mirror); scm_c_define_gsubr("meep-r-to-minus-r-symmetry", 1, 0, 0, (swig_guile_proc) _wrap_meep_r_to_minus_r_symmetry); SWIG_TypeClientData(SWIGTYPE_p_meep__symmetry, (void *) &_swig_guile_clientdatameep_symmetry); scm_c_define_gsubr("new-meep-symmetry", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_symmetry); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__symmetry->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_symmetry; scm_c_define_gsubr("delete-meep-symmetry", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_symmetry); scm_c_define_gsubr("meep-symmetry-transform-unshifted", 3, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_transform_unshifted); scm_c_define_gsubr("meep-symmetry-transform", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_transform); scm_c_define_gsubr("meep-symmetry-phase-shift", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_phase_shift); scm_c_define_gsubr("meep-symmetry-multiplicity", 1, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_multiplicity); scm_c_define_gsubr("meep-symmetry-is-primitive", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_is_primitive); scm_c_define_gsubr("meep-symmetry-reduce", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_reduce); scm_c_define_gsubr("meep-symmetry-meep-symmetry-add", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_add); scm_c_define_gsubr("meep-symmetry-meep-symmetry-mul", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_mul); scm_c_define_gsubr("meep-symmetry-meep-symmetry-sub", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_sub); scm_c_define_gsubr("meep-symmetry-meep-symmetry-eq", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_eq); scm_c_define_gsubr("meep-symmetry-meep-symmetry-neq", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_neq); SWIG_TypeClientData(SWIGTYPE_p_meep__volume_list, (void *) &_swig_guile_clientdatameep_volume_list); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__volume_list->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_volume_list; scm_c_define_gsubr("delete-meep-volume-list", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_volume_list); scm_c_define_gsubr("new-meep-volume-list", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_volume_list); scm_c_define_gsubr("meep-volume-list-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_v_set); scm_c_define_gsubr("meep-volume-list-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_v_get); scm_c_define_gsubr("meep-volume-list-c-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_c_set); scm_c_define_gsubr("meep-volume-list-c-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_c_get); scm_c_define_gsubr("meep-volume-list-weight-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_weight_set); scm_c_define_gsubr("meep-volume-list-weight-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_weight_get); scm_c_define_gsubr("meep-volume-list-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_next_set); scm_c_define_gsubr("meep-volume-list-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_next_get); scm_c_define_gsubr("meep-wall-time", 0, 0, 0, (swig_guile_proc) _wrap_meep_wall_time); SWIG_TypeClientData(SWIGTYPE_p_meep__initialize, (void *) &_swig_guile_clientdatameep_initialize); scm_c_define_gsubr("new-meep-initialize", 2, 0, 0, (swig_guile_proc) _wrap_new_meep_initialize); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__initialize->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_initialize; scm_c_define_gsubr("delete-meep-initialize", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_initialize); scm_c_define_gsubr("meep-initialize-elapsed-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_initialize_elapsed_time); scm_c_define_gsubr("meep-all-wait", 0, 0, 0, (swig_guile_proc) _wrap_meep_all_wait); scm_c_define_gsubr("meep-count-processors", 0, 0, 0, (swig_guile_proc) _wrap_meep_count_processors); scm_c_define_gsubr("meep-my-rank", 0, 0, 0, (swig_guile_proc) _wrap_meep_my_rank); scm_c_define_gsubr("meep-am-really-master", 0, 0, 0, (swig_guile_proc) _wrap_meep_am_really_master); scm_c_define_gsubr("meep-am-master", 0, 0, 0, (swig_guile_proc) _wrap_meep_am_master); scm_c_define_gsubr("meep-send", 0, 0, 1, (swig_guile_proc) _wrap_meep_send); scm_c_define_gsubr("meep-broadcast", 0, 0, 1, (swig_guile_proc) _wrap_meep_broadcast); scm_c_define_gsubr("meep-max-to-master", 1, 0, 0, (swig_guile_proc) _wrap_meep_max_to_master); scm_c_define_gsubr("meep-max-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_max_to_all); scm_c_define_gsubr("meep-sum-to-master", 0, 0, 1, (swig_guile_proc) _wrap_meep_sum_to_master); scm_c_define_gsubr("meep-sum-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_sum_to_all); scm_c_define_gsubr("meep-partial-sum-to-all", 1, 0, 0, (swig_guile_proc) _wrap_meep_partial_sum_to_all); scm_c_define_gsubr("meep-or-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_or_to_all); scm_c_define_gsubr("meep-and-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_and_to_all); scm_c_define_gsubr("meep-master-printf", 1, 0, 0, (swig_guile_proc) _wrap_meep_master_printf); scm_c_define_gsubr("meep-debug-printf", 1, 0, 0, (swig_guile_proc) _wrap_meep_debug_printf); scm_c_define_gsubr("meep-master-fprintf", 2, 0, 0, (swig_guile_proc) _wrap_meep_master_fprintf); scm_c_define_gsubr("meep-master-fopen", 2, 0, 0, (swig_guile_proc) _wrap_meep_master_fopen); scm_c_define_gsubr("meep-master-fclose", 1, 0, 0, (swig_guile_proc) _wrap_meep_master_fclose); scm_c_define_gsubr("meep-begin-critical-section", 1, 0, 0, (swig_guile_proc) _wrap_meep_begin_critical_section); scm_c_define_gsubr("meep-end-critical-section", 1, 0, 0, (swig_guile_proc) _wrap_meep_end_critical_section); scm_c_define_gsubr("meep-divide-parallel-processes", 1, 0, 0, (swig_guile_proc) _wrap_meep_divide_parallel_processes); scm_c_define_gsubr("meep-begin-global-communications", 0, 0, 0, (swig_guile_proc) _wrap_meep_begin_global_communications); scm_c_define_gsubr("meep-end-global-communications", 0, 0, 0, (swig_guile_proc) _wrap_meep_end_global_communications); scm_c_define_gsubr("meep-end-divide-parallel", 0, 0, 0, (swig_guile_proc) _wrap_meep_end_divide_parallel); scm_c_define_gsubr("meep-my-global-rank", 0, 0, 0, (swig_guile_proc) _wrap_meep_my_global_rank); scm_c_define_gsubr("MEEP-SINGLE", 0, 0, 0, (swig_guile_proc) _wrap_MEEP_SINGLE); scm_c_define_gsubr("quiet", 0, 1, 0, (swig_guile_proc) _wrap_quiet); scm_c_define_gsubr("pi", 0, 0, 0, (swig_guile_proc) _wrap_pi); scm_c_define_gsubr("infinity", 0, 0, 0, (swig_guile_proc) _wrap_infinity); scm_c_define_gsubr("nan", 0, 0, 0, (swig_guile_proc) _wrap_nan); SWIG_TypeClientData(SWIGTYPE_p_meep__susceptibility, (void *) &_swig_guile_clientdatameep_susceptibility); scm_c_define_gsubr("new-meep-susceptibility", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_susceptibility); scm_c_define_gsubr("meep-susceptibility-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_clone); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__susceptibility->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_susceptibility; scm_c_define_gsubr("delete-meep-susceptibility", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_susceptibility); scm_c_define_gsubr("meep-susceptibility-get-id", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_get_id); scm_c_define_gsubr("meep-susceptibility-update-P", 6, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_update_P); scm_c_define_gsubr("meep-susceptibility-subtract-P", 4, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_subtract_P); scm_c_define_gsubr("meep-susceptibility-needs-P", 4, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_needs_P); scm_c_define_gsubr("meep-susceptibility-needs-W-notowned", 3, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_needs_W_notowned); scm_c_define_gsubr("meep-susceptibility-needs-W-prev", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_needs_W_prev); scm_c_define_gsubr("meep-susceptibility-new-internal-data", 3, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_new_internal_data); scm_c_define_gsubr("meep-susceptibility-delete-internal-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_delete_internal_data); scm_c_define_gsubr("meep-susceptibility-init-internal-data", 5, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_init_internal_data); scm_c_define_gsubr("meep-susceptibility-copy-internal-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_copy_internal_data); scm_c_define_gsubr("meep-susceptibility-num-internal-notowned-needed", 3, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_num_internal_notowned_needed); scm_c_define_gsubr("meep-susceptibility-internal-notowned-ptr", 5, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_internal_notowned_ptr); scm_c_define_gsubr("meep-susceptibility-num-cinternal-notowned-needed", 3, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_num_cinternal_notowned_needed); scm_c_define_gsubr("meep-susceptibility-cinternal-notowned-ptr", 6, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_cinternal_notowned_ptr); scm_c_define_gsubr("meep-susceptibility-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_next_set); scm_c_define_gsubr("meep-susceptibility-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_next_get); scm_c_define_gsubr("meep-susceptibility-ntot-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_ntot_set); scm_c_define_gsubr("meep-susceptibility-ntot-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_ntot_get); scm_c_define_gsubr("meep-susceptibility-sigma-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_sigma_set); scm_c_define_gsubr("meep-susceptibility-sigma-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_sigma_get); scm_c_define_gsubr("meep-susceptibility-trivial-sigma-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_trivial_sigma_set); scm_c_define_gsubr("meep-susceptibility-trivial-sigma-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_susceptibility_trivial_sigma_get); SWIG_TypeClientData(SWIGTYPE_p_meep__lorentzian_susceptibility, (void *) &_swig_guile_clientdatameep_lorentzian_susceptibility); scm_c_define_gsubr("new-meep-lorentzian-susceptibility", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_lorentzian_susceptibility); scm_c_define_gsubr("meep-lorentzian-susceptibility-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_clone); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__lorentzian_susceptibility->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_lorentzian_susceptibility; scm_c_define_gsubr("delete-meep-lorentzian-susceptibility", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_lorentzian_susceptibility); scm_c_define_gsubr("meep-lorentzian-susceptibility-update-P", 6, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_update_P); scm_c_define_gsubr("meep-lorentzian-susceptibility-subtract-P", 4, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_subtract_P); scm_c_define_gsubr("meep-lorentzian-susceptibility-new-internal-data", 3, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_new_internal_data); scm_c_define_gsubr("meep-lorentzian-susceptibility-init-internal-data", 5, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_init_internal_data); scm_c_define_gsubr("meep-lorentzian-susceptibility-copy-internal-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_copy_internal_data); scm_c_define_gsubr("meep-lorentzian-susceptibility-num-cinternal-notowned-needed", 3, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_num_cinternal_notowned_needed); scm_c_define_gsubr("meep-lorentzian-susceptibility-cinternal-notowned-ptr", 6, 0, 0, (swig_guile_proc) _wrap_meep_lorentzian_susceptibility_cinternal_notowned_ptr); SWIG_TypeClientData(SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, (void *) &_swig_guile_clientdatameep_noisy_lorentzian_susceptibility); scm_c_define_gsubr("new-meep-noisy-lorentzian-susceptibility", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_noisy_lorentzian_susceptibility); scm_c_define_gsubr("meep-noisy-lorentzian-susceptibility-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_noisy_lorentzian_susceptibility_clone); scm_c_define_gsubr("meep-noisy-lorentzian-susceptibility-update-P", 6, 0, 0, (swig_guile_proc) _wrap_meep_noisy_lorentzian_susceptibility_update_P); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__noisy_lorentzian_susceptibility->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_noisy_lorentzian_susceptibility; scm_c_define_gsubr("delete-meep-noisy-lorentzian-susceptibility", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_noisy_lorentzian_susceptibility); SWIG_TypeClientData(SWIGTYPE_p_meep__multilevel_susceptibility, (void *) &_swig_guile_clientdatameep_multilevel_susceptibility); scm_c_define_gsubr("new-meep-multilevel-susceptibility", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_multilevel_susceptibility); scm_c_define_gsubr("meep-multilevel-susceptibility-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_clone); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__multilevel_susceptibility->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_multilevel_susceptibility; scm_c_define_gsubr("delete-meep-multilevel-susceptibility", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_multilevel_susceptibility); scm_c_define_gsubr("meep-multilevel-susceptibility-update-P", 6, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_update_P); scm_c_define_gsubr("meep-multilevel-susceptibility-subtract-P", 4, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_subtract_P); scm_c_define_gsubr("meep-multilevel-susceptibility-new-internal-data", 3, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_new_internal_data); scm_c_define_gsubr("meep-multilevel-susceptibility-init-internal-data", 5, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_init_internal_data); scm_c_define_gsubr("meep-multilevel-susceptibility-copy-internal-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_copy_internal_data); scm_c_define_gsubr("meep-multilevel-susceptibility-delete-internal-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_delete_internal_data); scm_c_define_gsubr("meep-multilevel-susceptibility-num-cinternal-notowned-needed", 3, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_num_cinternal_notowned_needed); scm_c_define_gsubr("meep-multilevel-susceptibility-cinternal-notowned-ptr", 6, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_cinternal_notowned_ptr); scm_c_define_gsubr("meep-multilevel-susceptibility-needs-W-notowned", 3, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_needs_W_notowned); scm_c_define_gsubr("meep-multilevel-susceptibility-needs-W-prev", 1, 0, 0, (swig_guile_proc) _wrap_meep_multilevel_susceptibility_needs_W_prev); SWIG_TypeClientData(SWIGTYPE_p_meep__h5file, (void *) &_swig_guile_clientdatameep_h5file); scm_c_define_gsubr("meep-h5file-READONLY", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_READONLY); scm_c_define_gsubr("meep-h5file-READWRITE", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_READWRITE); scm_c_define_gsubr("meep-h5file-WRITE", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_WRITE); scm_c_define_gsubr("new-meep-h5file", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_h5file); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__h5file->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_h5file; scm_c_define_gsubr("delete-meep-h5file", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_h5file); scm_c_define_gsubr("meep-h5file-ok", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_ok); scm_c_define_gsubr("meep-h5file-read", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_read); scm_c_define_gsubr("meep-h5file-write", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_write); scm_c_define_gsubr("meep-h5file-create-data", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_create_data); scm_c_define_gsubr("meep-h5file-extend-data", 4, 0, 0, (swig_guile_proc) _wrap_meep_h5file_extend_data); scm_c_define_gsubr("meep-h5file-create-or-extend-data", 6, 0, 0, (swig_guile_proc) _wrap_meep_h5file_create_or_extend_data); scm_c_define_gsubr("meep-h5file-write-chunk", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_write_chunk); scm_c_define_gsubr("meep-h5file-done-writing-chunks", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_done_writing_chunks); scm_c_define_gsubr("meep-h5file-read-size", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_read_size); scm_c_define_gsubr("meep-h5file-read-chunk", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_read_chunk); scm_c_define_gsubr("meep-h5file-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_remove); scm_c_define_gsubr("meep-h5file-remove-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_h5file_remove_data); scm_c_define_gsubr("meep-h5file-file-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_file_name); scm_c_define_gsubr("meep-h5file-prevent-deadlock", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_prevent_deadlock); scm_c_define_gsubr("DEFAULT-SUBPIXEL-TOL", 0, 0, 0, (swig_guile_proc) _wrap_DEFAULT_SUBPIXEL_TOL); scm_c_define_gsubr("DEFAULT-SUBPIXEL-MAXEVAL", 0, 0, 0, (swig_guile_proc) _wrap_DEFAULT_SUBPIXEL_MAXEVAL); SWIG_TypeClientData(SWIGTYPE_p_meep__material_function, (void *) &_swig_guile_clientdatameep_material_function); scm_c_define_gsubr("new-meep-material-function", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_material_function); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__material_function->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_material_function; scm_c_define_gsubr("delete-meep-material-function", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_material_function); scm_c_define_gsubr("meep-material-function-set-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_set_volume); scm_c_define_gsubr("meep-material-function-unset-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_material_function_unset_volume); scm_c_define_gsubr("meep-material-function-chi1p1", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi1p1); scm_c_define_gsubr("meep-material-function-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_eps); scm_c_define_gsubr("meep-material-function-has-mu", 1, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_mu); scm_c_define_gsubr("meep-material-function-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_mu); scm_c_define_gsubr("meep-material-function-has-conductivity", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_conductivity); scm_c_define_gsubr("meep-material-function-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_conductivity); scm_c_define_gsubr("meep-material-function-normal-vector", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_normal_vector); scm_c_define_gsubr("meep-material-function-eff-chi1inv-row", 0, 0, 1, (swig_guile_proc) _wrap_meep_material_function_eff_chi1inv_row); scm_c_define_gsubr("meep-material-function-sigma-row", 4, 0, 0, (swig_guile_proc) _wrap_meep_material_function_sigma_row); scm_c_define_gsubr("meep-material-function-has-chi3", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_chi3); scm_c_define_gsubr("meep-material-function-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi3); scm_c_define_gsubr("meep-material-function-has-chi2", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_chi2); scm_c_define_gsubr("meep-material-function-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi2); SWIG_TypeClientData(SWIGTYPE_p_meep__simple_material_function, (void *) &_swig_guile_clientdatameep_simple_material_function); scm_c_define_gsubr("new-meep-simple-material-function", 1, 0, 0, (swig_guile_proc) _wrap_new_meep_simple_material_function); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__simple_material_function->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_simple_material_function; scm_c_define_gsubr("delete-meep-simple-material-function", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_simple_material_function); scm_c_define_gsubr("meep-simple-material-function-chi1p1", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi1p1); scm_c_define_gsubr("meep-simple-material-function-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_eps); scm_c_define_gsubr("meep-simple-material-function-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_mu); scm_c_define_gsubr("meep-simple-material-function-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_conductivity); scm_c_define_gsubr("meep-simple-material-function-sigma-row", 4, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_sigma_row); scm_c_define_gsubr("meep-simple-material-function-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi3); scm_c_define_gsubr("meep-simple-material-function-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi2); SWIG_TypeClientData(SWIGTYPE_p_meep__structure_chunk, (void *) &_swig_guile_clientdatameep_structure_chunk); scm_c_define_gsubr("meep-structure-chunk-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_a_set); scm_c_define_gsubr("meep-structure-chunk-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_a_get); scm_c_define_gsubr("meep-structure-chunk-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_Courant_set); scm_c_define_gsubr("meep-structure-chunk-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_Courant_get); scm_c_define_gsubr("meep-structure-chunk-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_dt_set); scm_c_define_gsubr("meep-structure-chunk-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_dt_get); scm_c_define_gsubr("meep-structure-chunk-chi3-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi3_set); scm_c_define_gsubr("meep-structure-chunk-chi3-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi3_get); scm_c_define_gsubr("meep-structure-chunk-chi2-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi2_set); scm_c_define_gsubr("meep-structure-chunk-chi2-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi2_get); scm_c_define_gsubr("meep-structure-chunk-chi1inv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi1inv_set); scm_c_define_gsubr("meep-structure-chunk-chi1inv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi1inv_get); scm_c_define_gsubr("meep-structure-chunk-trivial-chi1inv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_trivial_chi1inv_set); scm_c_define_gsubr("meep-structure-chunk-trivial-chi1inv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_trivial_chi1inv_get); scm_c_define_gsubr("meep-structure-chunk-conductivity-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_conductivity_set); scm_c_define_gsubr("meep-structure-chunk-conductivity-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_conductivity_get); scm_c_define_gsubr("meep-structure-chunk-condinv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_set); scm_c_define_gsubr("meep-structure-chunk-condinv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_get); scm_c_define_gsubr("meep-structure-chunk-condinv-stale-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_stale_set); scm_c_define_gsubr("meep-structure-chunk-condinv-stale-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_stale_get); scm_c_define_gsubr("meep-structure-chunk-sig-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sig_set); scm_c_define_gsubr("meep-structure-chunk-sig-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sig_get); scm_c_define_gsubr("meep-structure-chunk-kap-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_kap_set); scm_c_define_gsubr("meep-structure-chunk-kap-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_kap_get); scm_c_define_gsubr("meep-structure-chunk-siginv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_siginv_set); scm_c_define_gsubr("meep-structure-chunk-siginv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_siginv_get); scm_c_define_gsubr("meep-structure-chunk-sigsize-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sigsize_set); scm_c_define_gsubr("meep-structure-chunk-sigsize-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sigsize_get); scm_c_define_gsubr("meep-structure-chunk-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_gv_set); scm_c_define_gsubr("meep-structure-chunk-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_gv_get); scm_c_define_gsubr("meep-structure-chunk-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_v_set); scm_c_define_gsubr("meep-structure-chunk-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_v_get); scm_c_define_gsubr("meep-structure-chunk-chiP-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chiP_set); scm_c_define_gsubr("meep-structure-chunk-chiP-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chiP_get); scm_c_define_gsubr("meep-structure-chunk-refcount-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_refcount_set); scm_c_define_gsubr("meep-structure-chunk-refcount-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_refcount_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__structure_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_structure_chunk; scm_c_define_gsubr("delete-meep-structure-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_structure_chunk); scm_c_define_gsubr("new-meep-structure-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_structure_chunk); scm_c_define_gsubr("meep-structure-chunk-set-chi1inv", 6, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi1inv); scm_c_define_gsubr("meep-structure-chunk-has-chi", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_has_chi); scm_c_define_gsubr("meep-structure-chunk-has-chisigma", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_has_chisigma); scm_c_define_gsubr("meep-structure-chunk-has-chi1inv", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_has_chi1inv); scm_c_define_gsubr("meep-structure-chunk-set-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_conductivity); scm_c_define_gsubr("meep-structure-chunk-update-condinv", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_update_condinv); scm_c_define_gsubr("meep-structure-chunk-set-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi3); scm_c_define_gsubr("meep-structure-chunk-set-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi2); scm_c_define_gsubr("meep-structure-chunk-use-pml", 10, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_use_pml); scm_c_define_gsubr("meep-structure-chunk-add-susceptibility", 4, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_add_susceptibility); scm_c_define_gsubr("meep-structure-chunk-mix-with", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_mix_with); scm_c_define_gsubr("meep-structure-chunk-n-proc", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_n_proc); scm_c_define_gsubr("meep-structure-chunk-is-mine", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_is_mine); scm_c_define_gsubr("meep-structure-chunk-remove-susceptibilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_remove_susceptibilities); scm_c_define_gsubr("meep-structure-chunk-get-chi1inv", 4, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_get_chi1inv); scm_c_define_gsubr("meep-structure-chunk-get-inveps", 4, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_get_inveps); scm_c_define_gsubr("meep-structure-chunk-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_max_eps); scm_c_define_gsubr("meep-pml-quadratic-profile", 2, 0, 0, (swig_guile_proc) _wrap_meep_pml_quadratic_profile); SWIG_TypeClientData(SWIGTYPE_p_meep__boundary_region, (void *) &_swig_guile_clientdatameep_boundary_region); scm_c_define_gsubr("meep-boundary-region-NOTHING-SPECIAL", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_NOTHING_SPECIAL); scm_c_define_gsubr("meep-boundary-region-PML", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_PML); scm_c_define_gsubr("new-meep-boundary-region", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_boundary_region); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__boundary_region->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_boundary_region; scm_c_define_gsubr("delete-meep-boundary-region", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_boundary_region); scm_c_define_gsubr("meep-boundary-region-meep-boundary-region-add", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_meep_boundary_region_add); scm_c_define_gsubr("meep-boundary-region-meep-boundary-region-mul", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_meep_boundary_region_mul); scm_c_define_gsubr("meep-boundary-region-apply", 0, 0, 1, (swig_guile_proc) _wrap_meep_boundary_region_apply); scm_c_define_gsubr("meep-boundary-region-check-ok", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_check_ok); scm_c_define_gsubr("meep-pml", 0, 0, 1, (swig_guile_proc) _wrap_meep_pml); SWIG_TypeClientData(SWIGTYPE_p_meep__structure, (void *) &_swig_guile_clientdatameep_structure); scm_c_define_gsubr("meep-structure-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunks_set); scm_c_define_gsubr("meep-structure-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunks_get); scm_c_define_gsubr("meep-structure-num-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_chunks_set); scm_c_define_gsubr("meep-structure-num-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_chunks_get); scm_c_define_gsubr("meep-structure-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_gv_set); scm_c_define_gsubr("meep-structure-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_gv_get); scm_c_define_gsubr("meep-structure-user-volume-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_user_volume_set); scm_c_define_gsubr("meep-structure-user-volume-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_user_volume_get); scm_c_define_gsubr("meep-structure-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_a_set); scm_c_define_gsubr("meep-structure-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_a_get); scm_c_define_gsubr("meep-structure-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_Courant_set); scm_c_define_gsubr("meep-structure-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_Courant_get); scm_c_define_gsubr("meep-structure-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_dt_set); scm_c_define_gsubr("meep-structure-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_dt_get); scm_c_define_gsubr("meep-structure-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_v_set); scm_c_define_gsubr("meep-structure-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_v_get); scm_c_define_gsubr("meep-structure-S-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_S_set); scm_c_define_gsubr("meep-structure-S-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_S_get); scm_c_define_gsubr("meep-structure-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_outdir_set); scm_c_define_gsubr("meep-structure-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_outdir_get); scm_c_define_gsubr("meep-structure-effort-volumes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_volumes_set); scm_c_define_gsubr("meep-structure-effort-volumes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_volumes_get); scm_c_define_gsubr("meep-structure-effort-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_set); scm_c_define_gsubr("meep-structure-effort-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_get); scm_c_define_gsubr("meep-structure-num-effort-volumes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_effort_volumes_set); scm_c_define_gsubr("meep-structure-num-effort-volumes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_effort_volumes_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__structure->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_structure; scm_c_define_gsubr("delete-meep-structure", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_structure); scm_c_define_gsubr("new-meep-structure", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_structure); scm_c_define_gsubr("meep-structure-set-materials", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_materials); scm_c_define_gsubr("meep-structure-set-chi1inv", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi1inv); scm_c_define_gsubr("meep-structure-has-chi", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_has_chi); scm_c_define_gsubr("meep-structure-set-epsilon", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_epsilon); scm_c_define_gsubr("meep-structure-set-mu", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_mu); scm_c_define_gsubr("meep-structure-set-conductivity", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_conductivity); scm_c_define_gsubr("meep-structure-set-chi3", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi3); scm_c_define_gsubr("meep-structure-set-chi2", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi2); scm_c_define_gsubr("meep-structure-add-susceptibility", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_add_susceptibility); scm_c_define_gsubr("meep-structure-remove-susceptibilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_remove_susceptibilities); scm_c_define_gsubr("meep-structure-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_set_output_directory); scm_c_define_gsubr("meep-structure-mix-with", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_mix_with); scm_c_define_gsubr("meep-structure-equal-layout", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_equal_layout); scm_c_define_gsubr("meep-structure-print-layout", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_print_layout); scm_c_define_gsubr("meep-structure-get-chi1inv", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_get_chi1inv); scm_c_define_gsubr("meep-structure-get-inveps", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_get_inveps); scm_c_define_gsubr("meep-structure-get-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_get_eps); scm_c_define_gsubr("meep-structure-get-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_get_mu); scm_c_define_gsubr("meep-structure-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_max_eps); SWIG_TypeClientData(SWIGTYPE_p_meep__src_time, (void *) &_swig_guile_clientdatameep_src_time); scm_c_define_gsubr("meep-src-time-is-integrated-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_integrated_set); scm_c_define_gsubr("meep-src-time-is-integrated-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_integrated_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_src_time; scm_c_define_gsubr("delete-meep-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_src_time); scm_c_define_gsubr("new-meep-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_src_time); scm_c_define_gsubr("meep-src-time-update", 3, 0, 0, (swig_guile_proc) _wrap_meep_src_time_update); scm_c_define_gsubr("meep-src-time-current", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_current); scm_c_define_gsubr("meep-src-time-last-time-max", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_last_time_max); scm_c_define_gsubr("meep-src-time-add-to", 3, 0, 0, (swig_guile_proc) _wrap_meep_src_time_add_to); scm_c_define_gsubr("meep-src-time-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_next_set); scm_c_define_gsubr("meep-src-time-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_next_get); scm_c_define_gsubr("meep-src-time-dipole", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_dipole); scm_c_define_gsubr("meep-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_last_time); scm_c_define_gsubr("meep-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_clone); scm_c_define_gsubr("meep-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_equal); scm_c_define_gsubr("meep-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_frequency); scm_c_define_gsubr("meep-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_set_frequency); scm_c_define_gsubr("meep-src-times-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_times_equal); SWIG_TypeClientData(SWIGTYPE_p_meep__gaussian_src_time, (void *) &_swig_guile_clientdatameep_gaussian_src_time); scm_c_define_gsubr("new-meep-gaussian-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_gaussian_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__gaussian_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_gaussian_src_time; scm_c_define_gsubr("delete-meep-gaussian-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_gaussian_src_time); scm_c_define_gsubr("meep-gaussian-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_dipole); scm_c_define_gsubr("meep-gaussian-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_last_time); scm_c_define_gsubr("meep-gaussian-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_clone); scm_c_define_gsubr("meep-gaussian-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_is_equal); scm_c_define_gsubr("meep-gaussian-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_frequency); scm_c_define_gsubr("meep-gaussian-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_set_frequency); SWIG_TypeClientData(SWIGTYPE_p_meep__continuous_src_time, (void *) &_swig_guile_clientdatameep_continuous_src_time); scm_c_define_gsubr("new-meep-continuous-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_continuous_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__continuous_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_continuous_src_time; scm_c_define_gsubr("delete-meep-continuous-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_continuous_src_time); scm_c_define_gsubr("meep-continuous-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_dipole); scm_c_define_gsubr("meep-continuous-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_last_time); scm_c_define_gsubr("meep-continuous-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_clone); scm_c_define_gsubr("meep-continuous-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_is_equal); scm_c_define_gsubr("meep-continuous-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_frequency); scm_c_define_gsubr("meep-continuous-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_set_frequency); SWIG_TypeClientData(SWIGTYPE_p_meep__custom_src_time, (void *) &_swig_guile_clientdatameep_custom_src_time); scm_c_define_gsubr("new-meep-custom-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_custom_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__custom_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_custom_src_time; scm_c_define_gsubr("delete-meep-custom-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_custom_src_time); scm_c_define_gsubr("meep-custom-src-time-current", 3, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_current); scm_c_define_gsubr("meep-custom-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_dipole); scm_c_define_gsubr("meep-custom-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_last_time); scm_c_define_gsubr("meep-custom-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_clone); scm_c_define_gsubr("meep-custom-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_is_equal); SWIG_TypeClientData(SWIGTYPE_p_meep__monitor_point, (void *) &_swig_guile_clientdatameep_monitor_point); scm_c_define_gsubr("new-meep-monitor-point", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_monitor_point); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__monitor_point->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_monitor_point; scm_c_define_gsubr("delete-meep-monitor-point", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_monitor_point); scm_c_define_gsubr("meep-monitor-point-loc-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_loc_set); scm_c_define_gsubr("meep-monitor-point-loc-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_loc_get); scm_c_define_gsubr("meep-monitor-point-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_t_set); scm_c_define_gsubr("meep-monitor-point-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_t_get); scm_c_define_gsubr("meep-monitor-point-f-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_f_set); scm_c_define_gsubr("meep-monitor-point-f-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_f_get); scm_c_define_gsubr("meep-monitor-point-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_next_set); scm_c_define_gsubr("meep-monitor-point-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_next_get); scm_c_define_gsubr("meep-monitor-point-get-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_get_component); scm_c_define_gsubr("meep-monitor-point-poynting-in-direction", 0, 0, 1, (swig_guile_proc) _wrap_meep_monitor_point_poynting_in_direction); scm_c_define_gsubr("meep-monitor-point-fourier-transform", 0, 0, 1, (swig_guile_proc) _wrap_meep_monitor_point_fourier_transform); scm_c_define_gsubr("meep-monitor-point-harminv", 8, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_harminv); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_chunk, (void *) &_swig_guile_clientdatameep_dft_chunk); scm_c_define_gsubr("new-meep-dft-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_chunk_rest); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_chunk; scm_c_define_gsubr("delete-meep-dft-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_chunk); scm_c_define_gsubr("meep-dft-chunk-update-dft", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_update_dft); scm_c_define_gsubr("meep-dft-chunk-scale-dft", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_scale_dft); scm_c_define_gsubr("meep-dft-chunk-meep-dft-chunk-subeq", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_meep_dft_chunk_subeq); scm_c_define_gsubr("meep-dft-chunk-omega-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_omega_min_set); scm_c_define_gsubr("meep-dft-chunk-omega-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_omega_min_get); scm_c_define_gsubr("meep-dft-chunk-domega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_domega_set); scm_c_define_gsubr("meep-dft-chunk-domega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_domega_get); scm_c_define_gsubr("meep-dft-chunk-Nomega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_Nomega_set); scm_c_define_gsubr("meep-dft-chunk-Nomega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_Nomega_get); scm_c_define_gsubr("meep-dft-chunk-c-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_c_set); scm_c_define_gsubr("meep-dft-chunk-c-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_c_get); scm_c_define_gsubr("meep-dft-chunk-N-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_N_set); scm_c_define_gsubr("meep-dft-chunk-N-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_N_get); scm_c_define_gsubr("meep-dft-chunk-dft-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_set); scm_c_define_gsubr("meep-dft-chunk-dft-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_get); scm_c_define_gsubr("meep-dft-chunk-next-in-chunk-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_chunk_set); scm_c_define_gsubr("meep-dft-chunk-next-in-chunk-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_chunk_get); scm_c_define_gsubr("meep-dft-chunk-next-in-dft-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_dft_set); scm_c_define_gsubr("meep-dft-chunk-next-in-dft-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_dft_get); scm_c_define_gsubr("meep-dft-chunk-extra-weight-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_extra_weight_set); scm_c_define_gsubr("meep-dft-chunk-extra-weight-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_extra_weight_get); scm_c_define_gsubr("meep-dft-chunk-fc-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_fc_set); scm_c_define_gsubr("meep-dft-chunk-fc-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_fc_get); scm_c_define_gsubr("meep-dft-chunk-is-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_is_set); scm_c_define_gsubr("meep-dft-chunk-is-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_is_get); scm_c_define_gsubr("meep-dft-chunk-ie-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_ie_set); scm_c_define_gsubr("meep-dft-chunk-ie-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_ie_get); scm_c_define_gsubr("meep-dft-chunk-s0-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_s0_set); scm_c_define_gsubr("meep-dft-chunk-s0-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_s0_get); scm_c_define_gsubr("meep-dft-chunk-s1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_s1_set); scm_c_define_gsubr("meep-dft-chunk-s1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_s1_get); scm_c_define_gsubr("meep-dft-chunk-e0-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_e0_set); scm_c_define_gsubr("meep-dft-chunk-e0-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_e0_get); scm_c_define_gsubr("meep-dft-chunk-e1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_e1_set); scm_c_define_gsubr("meep-dft-chunk-e1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_e1_get); scm_c_define_gsubr("meep-dft-chunk-dV0-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dV0_set); scm_c_define_gsubr("meep-dft-chunk-dV0-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dV0_get); scm_c_define_gsubr("meep-dft-chunk-dV1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dV1_set); scm_c_define_gsubr("meep-dft-chunk-dV1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dV1_get); scm_c_define_gsubr("meep-dft-chunk-sqrt-dV-and-interp-weights-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_sqrt_dV_and_interp_weights_set); scm_c_define_gsubr("meep-dft-chunk-sqrt-dV-and-interp-weights-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_sqrt_dV_and_interp_weights_get); scm_c_define_gsubr("meep-dft-chunk-scale-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_scale_set); scm_c_define_gsubr("meep-dft-chunk-scale-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_scale_get); scm_c_define_gsubr("meep-dft-chunk-shift-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_shift_set); scm_c_define_gsubr("meep-dft-chunk-shift-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_shift_get); scm_c_define_gsubr("meep-dft-chunk-S-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_S_set); scm_c_define_gsubr("meep-dft-chunk-S-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_S_get); scm_c_define_gsubr("meep-dft-chunk-sn-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_sn_set); scm_c_define_gsubr("meep-dft-chunk-sn-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_sn_get); scm_c_define_gsubr("meep-dft-chunk-dft-phase-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_phase_set); scm_c_define_gsubr("meep-dft-chunk-dft-phase-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_phase_get); scm_c_define_gsubr("meep-dft-chunk-avg1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_avg1_set); scm_c_define_gsubr("meep-dft-chunk-avg1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_avg1_get); scm_c_define_gsubr("meep-dft-chunk-avg2-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_avg2_set); scm_c_define_gsubr("meep-dft-chunk-avg2-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_avg2_get); scm_c_define_gsubr("meep-dft-chunk-vc-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_vc_set); scm_c_define_gsubr("meep-dft-chunk-vc-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_vc_get); scm_c_define_gsubr("meep-save-dft-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_save_dft_hdf5); scm_c_define_gsubr("meep-load-dft-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_load_dft_hdf5); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_flux, (void *) &_swig_guile_clientdatameep_dft_flux); scm_c_define_gsubr("new-meep-dft-flux", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_flux); scm_c_define_gsubr("meep-dft-flux-flux", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_flux); scm_c_define_gsubr("meep-dft-flux-meep-dft-flux-subeq", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_meep_dft_flux_subeq); scm_c_define_gsubr("meep-dft-flux-save-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_flux_save_hdf5); scm_c_define_gsubr("meep-dft-flux-load-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_flux_load_hdf5); scm_c_define_gsubr("meep-dft-flux-scale-dfts", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_scale_dfts); scm_c_define_gsubr("meep-dft-flux-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_remove); scm_c_define_gsubr("meep-dft-flux-freq-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_freq_min_set); scm_c_define_gsubr("meep-dft-flux-freq-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_freq_min_get); scm_c_define_gsubr("meep-dft-flux-dfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_dfreq_set); scm_c_define_gsubr("meep-dft-flux-dfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_dfreq_get); scm_c_define_gsubr("meep-dft-flux-Nfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_Nfreq_set); scm_c_define_gsubr("meep-dft-flux-Nfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_Nfreq_get); scm_c_define_gsubr("meep-dft-flux-E-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_E_set); scm_c_define_gsubr("meep-dft-flux-E-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_E_get); scm_c_define_gsubr("meep-dft-flux-H-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_H_set); scm_c_define_gsubr("meep-dft-flux-H-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_H_get); scm_c_define_gsubr("meep-dft-flux-cE-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cE_set); scm_c_define_gsubr("meep-dft-flux-cE-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cE_get); scm_c_define_gsubr("meep-dft-flux-cH-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cH_set); scm_c_define_gsubr("meep-dft-flux-cH-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cH_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_flux->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_flux; scm_c_define_gsubr("delete-meep-dft-flux", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_flux); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_force, (void *) &_swig_guile_clientdatameep_dft_force); scm_c_define_gsubr("new-meep-dft-force", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_force); scm_c_define_gsubr("meep-dft-force-force", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_force); scm_c_define_gsubr("meep-dft-force-save-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_force_save_hdf5); scm_c_define_gsubr("meep-dft-force-load-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_force_load_hdf5); scm_c_define_gsubr("meep-dft-force-scale-dfts", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_scale_dfts); scm_c_define_gsubr("meep-dft-force-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_remove); scm_c_define_gsubr("meep-dft-force-freq-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_freq_min_set); scm_c_define_gsubr("meep-dft-force-freq-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_freq_min_get); scm_c_define_gsubr("meep-dft-force-dfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_dfreq_set); scm_c_define_gsubr("meep-dft-force-dfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_dfreq_get); scm_c_define_gsubr("meep-dft-force-Nfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_Nfreq_set); scm_c_define_gsubr("meep-dft-force-Nfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_Nfreq_get); scm_c_define_gsubr("meep-dft-force-offdiag1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag1_set); scm_c_define_gsubr("meep-dft-force-offdiag1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag1_get); scm_c_define_gsubr("meep-dft-force-offdiag2-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag2_set); scm_c_define_gsubr("meep-dft-force-offdiag2-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag2_get); scm_c_define_gsubr("meep-dft-force-diag-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_diag_set); scm_c_define_gsubr("meep-dft-force-diag-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_diag_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_force->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_force; scm_c_define_gsubr("delete-meep-dft-force", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_force); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_near2far, (void *) &_swig_guile_clientdatameep_dft_near2far); scm_c_define_gsubr("new-meep-dft-near2far", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_near2far); scm_c_define_gsubr("meep-dft-near2far-farfield", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_farfield); scm_c_define_gsubr("meep-dft-near2far-farfield-lowlevel", 3, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_farfield_lowlevel); scm_c_define_gsubr("meep-dft-near2far-save-farfields", 5, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_save_farfields); scm_c_define_gsubr("meep-dft-near2far-save-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_near2far_save_hdf5); scm_c_define_gsubr("meep-dft-near2far-load-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_near2far_load_hdf5); scm_c_define_gsubr("meep-dft-near2far-scale-dfts", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_scale_dfts); scm_c_define_gsubr("meep-dft-near2far-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_remove); scm_c_define_gsubr("meep-dft-near2far-freq-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_freq_min_set); scm_c_define_gsubr("meep-dft-near2far-freq-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_freq_min_get); scm_c_define_gsubr("meep-dft-near2far-dfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_dfreq_set); scm_c_define_gsubr("meep-dft-near2far-dfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_dfreq_get); scm_c_define_gsubr("meep-dft-near2far-Nfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_Nfreq_set); scm_c_define_gsubr("meep-dft-near2far-Nfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_Nfreq_get); scm_c_define_gsubr("meep-dft-near2far-F-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_F_set); scm_c_define_gsubr("meep-dft-near2far-F-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_F_get); scm_c_define_gsubr("meep-dft-near2far-eps-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_eps_set); scm_c_define_gsubr("meep-dft-near2far-eps-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_eps_get); scm_c_define_gsubr("meep-dft-near2far-mu-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_mu_set); scm_c_define_gsubr("meep-dft-near2far-mu-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_near2far_mu_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_near2far->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_near2far; scm_c_define_gsubr("delete-meep-dft-near2far", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_near2far); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_ldos, (void *) &_swig_guile_clientdatameep_dft_ldos); scm_c_define_gsubr("new-meep-dft-ldos", 3, 0, 0, (swig_guile_proc) _wrap_new_meep_dft_ldos); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_ldos->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_ldos; scm_c_define_gsubr("delete-meep-dft-ldos", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_ldos); scm_c_define_gsubr("meep-dft-ldos-update", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_update); scm_c_define_gsubr("meep-dft-ldos-ldos", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_ldos); scm_c_define_gsubr("meep-dft-ldos-F", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_F); scm_c_define_gsubr("meep-dft-ldos-J", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_J); scm_c_define_gsubr("meep-dft-ldos-omega-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_omega_min_set); scm_c_define_gsubr("meep-dft-ldos-omega-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_omega_min_get); scm_c_define_gsubr("meep-dft-ldos-domega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_domega_set); scm_c_define_gsubr("meep-dft-ldos-domega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_domega_get); scm_c_define_gsubr("meep-dft-ldos-Nomega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_Nomega_set); scm_c_define_gsubr("meep-dft-ldos-Nomega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_ldos_Nomega_get); scm_c_define_gsubr("meep-in-or-out-Incoming", 0, 0, 0, (swig_guile_proc) _wrap_meep_in_or_out_Incoming); scm_c_define_gsubr("meep-in-or-out-Outgoing", 0, 0, 0, (swig_guile_proc) _wrap_meep_in_or_out_Outgoing); scm_c_define_gsubr("meep-connect-phase-CONNECT-PHASE", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_PHASE); scm_c_define_gsubr("meep-connect-phase-CONNECT-NEGATE", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_NEGATE); scm_c_define_gsubr("meep-connect-phase-CONNECT-COPY", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_COPY); SWIG_TypeClientData(SWIGTYPE_p_meep__polarization_state_s, (void *) &_swig_guile_clientdatapolarization_state); scm_c_define_gsubr("polarization-state-data-set", 2, 0, 0, (swig_guile_proc) _wrap_polarization_state_data_set); scm_c_define_gsubr("polarization-state-data-get", 1, 0, 0, (swig_guile_proc) _wrap_polarization_state_data_get); scm_c_define_gsubr("polarization-state-s-set", 2, 0, 0, (swig_guile_proc) _wrap_polarization_state_s_set); scm_c_define_gsubr("polarization-state-s-get", 1, 0, 0, (swig_guile_proc) _wrap_polarization_state_s_get); scm_c_define_gsubr("polarization-state-next-set", 2, 0, 0, (swig_guile_proc) _wrap_polarization_state_next_set); scm_c_define_gsubr("polarization-state-next-get", 1, 0, 0, (swig_guile_proc) _wrap_polarization_state_next_get); scm_c_define_gsubr("new-polarization-state", 0, 0, 0, (swig_guile_proc) _wrap_new_polarization_state); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__polarization_state_s->clientdata))->destroy = (guile_destructor) _wrap_delete_polarization_state; scm_c_define_gsubr("delete-polarization-state", 1, 0, 0, (swig_guile_proc) _wrap_delete_polarization_state); SWIG_TypeClientData(SWIGTYPE_p_meep__fields_chunk, (void *) &_swig_guile_clientdatameep_fields_chunk); scm_c_define_gsubr("meep-fields-chunk-f-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_set); scm_c_define_gsubr("meep-fields-chunk-f-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_get); scm_c_define_gsubr("meep-fields-chunk-f-u-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_set); scm_c_define_gsubr("meep-fields-chunk-f-u-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_get); scm_c_define_gsubr("meep-fields-chunk-f-w-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_set); scm_c_define_gsubr("meep-fields-chunk-f-w-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_get); scm_c_define_gsubr("meep-fields-chunk-f-cond-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_set); scm_c_define_gsubr("meep-fields-chunk-f-cond-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_get); scm_c_define_gsubr("meep-fields-chunk-f-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-u-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-u-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-w-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-w-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-cond-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-cond-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-w-prev-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_prev_set); scm_c_define_gsubr("meep-fields-chunk-f-w-prev-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_prev_get); scm_c_define_gsubr("meep-fields-chunk-f-minus-p-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_minus_p_set); scm_c_define_gsubr("meep-fields-chunk-f-minus-p-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_minus_p_get); scm_c_define_gsubr("meep-fields-chunk-f-rderiv-int-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_rderiv_int_set); scm_c_define_gsubr("meep-fields-chunk-f-rderiv-int-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_rderiv_int_get); scm_c_define_gsubr("meep-fields-chunk-dft-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dft_chunks_set); scm_c_define_gsubr("meep-fields-chunk-dft-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dft_chunks_get); scm_c_define_gsubr("meep-fields-chunk-zeroes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zeroes_set); scm_c_define_gsubr("meep-fields-chunk-zeroes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zeroes_get); scm_c_define_gsubr("meep-fields-chunk-num-zeroes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_zeroes_set); scm_c_define_gsubr("meep-fields-chunk-num-zeroes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_zeroes_get); scm_c_define_gsubr("meep-fields-chunk-connections-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connections_set); scm_c_define_gsubr("meep-fields-chunk-connections-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connections_get); scm_c_define_gsubr("meep-fields-chunk-num-connections-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_connections_set); scm_c_define_gsubr("meep-fields-chunk-num-connections-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_connections_get); scm_c_define_gsubr("meep-fields-chunk-connection-phases-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connection_phases_set); scm_c_define_gsubr("meep-fields-chunk-connection-phases-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connection_phases_get); scm_c_define_gsubr("meep-fields-chunk-npol-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_npol_set); scm_c_define_gsubr("meep-fields-chunk-npol-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_npol_get); scm_c_define_gsubr("meep-fields-chunk-pol-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_pol_set); scm_c_define_gsubr("meep-fields-chunk-pol-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_pol_get); scm_c_define_gsubr("meep-fields-chunk-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_a_set); scm_c_define_gsubr("meep-fields-chunk-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_a_get); scm_c_define_gsubr("meep-fields-chunk-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_Courant_set); scm_c_define_gsubr("meep-fields-chunk-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_Courant_get); scm_c_define_gsubr("meep-fields-chunk-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dt_set); scm_c_define_gsubr("meep-fields-chunk-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dt_get); scm_c_define_gsubr("meep-fields-chunk-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_gv_set); scm_c_define_gsubr("meep-fields-chunk-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_gv_get); scm_c_define_gsubr("meep-fields-chunk-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_v_set); scm_c_define_gsubr("meep-fields-chunk-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_v_get); scm_c_define_gsubr("meep-fields-chunk-m-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_m_set); scm_c_define_gsubr("meep-fields-chunk-m-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_m_get); scm_c_define_gsubr("meep-fields-chunk-zero-fields-near-cylorigin-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields_near_cylorigin_set); scm_c_define_gsubr("meep-fields-chunk-zero-fields-near-cylorigin-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields_near_cylorigin_get); scm_c_define_gsubr("meep-fields-chunk-beta-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_beta_set); scm_c_define_gsubr("meep-fields-chunk-beta-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_beta_get); scm_c_define_gsubr("meep-fields-chunk-is-real-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_real_set); scm_c_define_gsubr("meep-fields-chunk-is-real-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_real_get); scm_c_define_gsubr("meep-fields-chunk-bands-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_bands_set); scm_c_define_gsubr("meep-fields-chunk-bands-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_bands_get); scm_c_define_gsubr("meep-fields-chunk-sources-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_sources_set); scm_c_define_gsubr("meep-fields-chunk-sources-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_sources_get); scm_c_define_gsubr("meep-fields-chunk-new-s-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_new_s_set); scm_c_define_gsubr("meep-fields-chunk-new-s-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_new_s_get); scm_c_define_gsubr("meep-fields-chunk-s-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_s_set); scm_c_define_gsubr("meep-fields-chunk-s-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_s_get); scm_c_define_gsubr("meep-fields-chunk-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_outdir_set); scm_c_define_gsubr("meep-fields-chunk-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_outdir_get); scm_c_define_gsubr("new-meep-fields-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_fields_chunk); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__fields_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_fields_chunk; scm_c_define_gsubr("delete-meep-fields-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_fields_chunk); scm_c_define_gsubr("meep-fields-chunk-peek-field", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_peek_field); scm_c_define_gsubr("meep-fields-chunk-use-real-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_use_real_fields); scm_c_define_gsubr("meep-fields-chunk-have-component", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_have_component); scm_c_define_gsubr("meep-fields-chunk-last-source-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_last_source_time); scm_c_define_gsubr("meep-fields-chunk-get-field-gv", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_get_field_gv); scm_c_define_gsubr("meep-fields-chunk-get-field", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_get_field); scm_c_define_gsubr("meep-fields-chunk-get-chi1inv", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_get_chi1inv); scm_c_define_gsubr("meep-fields-chunk-backup-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_backup_component); scm_c_define_gsubr("meep-fields-chunk-average-with-backup", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_average_with_backup); scm_c_define_gsubr("meep-fields-chunk-restore-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_restore_component); scm_c_define_gsubr("meep-fields-chunk-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_set_output_directory); scm_c_define_gsubr("meep-fields-chunk-verbose", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_verbose); scm_c_define_gsubr("meep-fields-chunk-count-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_count_volume); scm_c_define_gsubr("meep-fields-chunk-n-proc", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_n_proc); scm_c_define_gsubr("meep-fields-chunk-is-mine", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_mine); scm_c_define_gsubr("meep-fields-chunk-zero-metal", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_metal); scm_c_define_gsubr("meep-fields-chunk-needs-W-notowned", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_needs_W_notowned); scm_c_define_gsubr("meep-fields-chunk-remove-sources", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_remove_sources); scm_c_define_gsubr("meep-fields-chunk-remove-susceptibilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_remove_susceptibilities); scm_c_define_gsubr("meep-fields-chunk-zero-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields); scm_c_define_gsubr("meep-fields-chunk-needs-W-prev", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_needs_W_prev); scm_c_define_gsubr("meep-fields-chunk-update-eh", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_update_eh); scm_c_define_gsubr("meep-fields-chunk-alloc-f", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_alloc_f); scm_c_define_gsubr("meep-fields-chunk-figure-out-step-plan", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_figure_out_step_plan); scm_c_define_gsubr("meep-fields-chunk-set-solve-cw-omega", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_set_solve_cw_omega); scm_c_define_gsubr("meep-fields-chunk-unset-solve-cw-omega", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_unset_solve_cw_omega); scm_c_define_gsubr("meep-boundary-condition-Periodic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Periodic); scm_c_define_gsubr("meep-boundary-condition-Metallic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Metallic); scm_c_define_gsubr("meep-boundary-condition-Magnetic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Magnetic); scm_c_define_gsubr("meep-boundary-condition-None", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_None); scm_c_define_gsubr("meep-time-sink-Connecting", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Connecting); scm_c_define_gsubr("meep-time-sink-Stepping", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Stepping); scm_c_define_gsubr("meep-time-sink-Boundaries", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Boundaries); scm_c_define_gsubr("meep-time-sink-MpiTime", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_MpiTime); scm_c_define_gsubr("meep-time-sink-FieldOutput", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_FieldOutput); scm_c_define_gsubr("meep-time-sink-FourierTransforming", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_FourierTransforming); scm_c_define_gsubr("meep-time-sink-Other", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Other); scm_c_define_gsubr("meep-derived-component-func", 4, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_func); SWIG_TypeClientData(SWIGTYPE_p_meep__fields, (void *) &_swig_guile_clientdatameep_fields); scm_c_define_gsubr("meep-fields-num-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_num_chunks_set); scm_c_define_gsubr("meep-fields-num-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_num_chunks_get); scm_c_define_gsubr("meep-fields-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunks_set); scm_c_define_gsubr("meep-fields-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunks_get); scm_c_define_gsubr("meep-fields-sources-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_sources_set); scm_c_define_gsubr("meep-fields-sources-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_sources_get); scm_c_define_gsubr("meep-fields-fluxes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_fluxes_set); scm_c_define_gsubr("meep-fields-fluxes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_fluxes_get); scm_c_define_gsubr("meep-fields-S-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_S_set); scm_c_define_gsubr("meep-fields-S-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_S_get); scm_c_define_gsubr("meep-fields-comm-blocks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_blocks_set); scm_c_define_gsubr("meep-fields-comm-blocks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_blocks_get); scm_c_define_gsubr("meep-fields-comm-sizes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_sizes_set); scm_c_define_gsubr("meep-fields-comm-sizes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_sizes_get); scm_c_define_gsubr("meep-fields-comm-size-tot", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_size_tot); scm_c_define_gsubr("meep-fields-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_a_set); scm_c_define_gsubr("meep-fields-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_a_get); scm_c_define_gsubr("meep-fields-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_dt_set); scm_c_define_gsubr("meep-fields-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_dt_get); scm_c_define_gsubr("meep-fields-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_gv_set); scm_c_define_gsubr("meep-fields-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_gv_get); scm_c_define_gsubr("meep-fields-user-volume-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_user_volume_set); scm_c_define_gsubr("meep-fields-user-volume-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_user_volume_get); scm_c_define_gsubr("meep-fields-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_v_set); scm_c_define_gsubr("meep-fields-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_v_get); scm_c_define_gsubr("meep-fields-m-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_m_set); scm_c_define_gsubr("meep-fields-m-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_m_get); scm_c_define_gsubr("meep-fields-beta-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_beta_set); scm_c_define_gsubr("meep-fields-beta-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_beta_get); scm_c_define_gsubr("meep-fields-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_t_set); scm_c_define_gsubr("meep-fields-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_t_get); scm_c_define_gsubr("meep-fields-phasein-time-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_phasein_time_set); scm_c_define_gsubr("meep-fields-phasein-time-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_phasein_time_get); scm_c_define_gsubr("meep-fields-is-real-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_real_set); scm_c_define_gsubr("meep-fields-is-real-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_real_get); scm_c_define_gsubr("meep-fields-k-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_k_set); scm_c_define_gsubr("meep-fields-k-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_k_get); scm_c_define_gsubr("meep-fields-eikna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_eikna_set); scm_c_define_gsubr("meep-fields-eikna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_eikna_get); scm_c_define_gsubr("meep-fields-coskna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_coskna_set); scm_c_define_gsubr("meep-fields-coskna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_coskna_get); scm_c_define_gsubr("meep-fields-sinkna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_sinkna_set); scm_c_define_gsubr("meep-fields-sinkna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_sinkna_get); scm_c_define_gsubr("meep-fields-boundaries-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_boundaries_set); scm_c_define_gsubr("meep-fields-boundaries-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_boundaries_get); scm_c_define_gsubr("meep-fields-bands-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_bands_set); scm_c_define_gsubr("meep-fields-bands-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_bands_get); scm_c_define_gsubr("meep-fields-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_outdir_set); scm_c_define_gsubr("meep-fields-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_outdir_get); scm_c_define_gsubr("new-meep-fields", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_fields); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__fields->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_fields; scm_c_define_gsubr("delete-meep-fields", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_fields); scm_c_define_gsubr("meep-fields-equal-layout", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_equal_layout); scm_c_define_gsubr("meep-fields-use-real-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_use_real_fields); scm_c_define_gsubr("meep-fields-zero-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_zero_fields); scm_c_define_gsubr("meep-fields-remove-sources", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_sources); scm_c_define_gsubr("meep-fields-remove-susceptibilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_susceptibilities); scm_c_define_gsubr("meep-fields-remove-fluxes", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_fluxes); scm_c_define_gsubr("meep-fields-reset", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_reset); scm_c_define_gsubr("meep-fields-time-spent-on", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_time_spent_on); scm_c_define_gsubr("meep-fields-print-times", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_print_times); scm_c_define_gsubr("meep-fields-set-boundary", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_boundary); scm_c_define_gsubr("meep-fields-use-bloch", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_use_bloch); scm_c_define_gsubr("meep-fields-lattice-vector", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_lattice_vector); scm_c_define_gsubr("meep-fields-update-eh", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_update_eh); scm_c_define_gsubr("meep-fields-total-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_total_volume); scm_c_define_gsubr("meep-fields-output-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_output_hdf5); scm_c_define_gsubr("meep-fields-open-h5file", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_open_h5file); scm_c_define_gsubr("meep-fields-h5file-name", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_h5file_name); scm_c_define_gsubr("meep-fields-last-step-output-wall-time-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_wall_time_set); scm_c_define_gsubr("meep-fields-last-step-output-wall-time-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_wall_time_get); scm_c_define_gsubr("meep-fields-last-step-output-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_t_set); scm_c_define_gsubr("meep-fields-last-step-output-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_t_get); scm_c_define_gsubr("meep-fields-step", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_step); scm_c_define_gsubr("meep-fields-round-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_round_time); scm_c_define_gsubr("meep-fields-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_time); scm_c_define_gsubr("meep-fields-solve-cw", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_solve_cw); scm_c_define_gsubr("meep-fields-last-source-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_source_time); scm_c_define_gsubr("meep-fields-add-point-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_point_source); scm_c_define_gsubr("meep-fields-add-volume-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_volume_source); scm_c_define_gsubr("meep-fields-require-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_require_component); scm_c_define_gsubr("meep-fields-add-eigenmode-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_eigenmode_source); scm_c_define_gsubr("meep-fields-initialize-field", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_field); scm_c_define_gsubr("meep-fields-initialize-with-nth-te", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_nth_te); scm_c_define_gsubr("meep-fields-initialize-with-nth-tm", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_nth_tm); scm_c_define_gsubr("meep-fields-initialize-with-n-te", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_n_te); scm_c_define_gsubr("meep-fields-initialize-with-n-tm", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_n_tm); scm_c_define_gsubr("meep-fields-phase-in-material", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_phase_in_material); scm_c_define_gsubr("meep-fields-is-phasing", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_phasing); scm_c_define_gsubr("meep-fields-loop-in-chunks", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_loop_in_chunks); scm_c_define_gsubr("meep-fields-integrate", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_integrate); scm_c_define_gsubr("meep-fields-integrate2", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_integrate2); scm_c_define_gsubr("meep-fields-max-abs", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_max_abs); scm_c_define_gsubr("meep-fields-add-dft-pt", 6, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_pt); scm_c_define_gsubr("meep-fields-add-dft", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_dft); scm_c_define_gsubr("meep-fields-update-dfts", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_update_dfts); scm_c_define_gsubr("meep-fields-add-dft-flux-box", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_flux_box); scm_c_define_gsubr("meep-fields-add-dft-flux-plane", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_flux_plane); scm_c_define_gsubr("meep-fields-add-dft-flux", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_dft_flux); scm_c_define_gsubr("meep-fields-add-dft-force", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_force); scm_c_define_gsubr("meep-fields-add-dft-near2far", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_near2far); scm_c_define_gsubr("meep-fields-get-inveps", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_inveps); scm_c_define_gsubr("meep-fields-get-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_eps); scm_c_define_gsubr("meep-fields-get-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_mu); scm_c_define_gsubr("meep-fields-get-point", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_point); scm_c_define_gsubr("meep-fields-get-new-point", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_new_point); scm_c_define_gsubr("meep-fields-prepare-for-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_prepare_for_bands); scm_c_define_gsubr("meep-fields-record-bands", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_record_bands); scm_c_define_gsubr("meep-fields-get-band", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_band); scm_c_define_gsubr("meep-fields-grace-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_grace_bands); scm_c_define_gsubr("meep-fields-output-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_output_bands); scm_c_define_gsubr("meep-fields-synchronize-magnetic-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_synchronize_magnetic_fields); scm_c_define_gsubr("meep-fields-restore-magnetic-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_restore_magnetic_fields); scm_c_define_gsubr("meep-fields-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_energy_in_box); scm_c_define_gsubr("meep-fields-electric-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_in_box); scm_c_define_gsubr("meep-fields-magnetic-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_magnetic_energy_in_box); scm_c_define_gsubr("meep-fields-thermo-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_thermo_energy_in_box); scm_c_define_gsubr("meep-fields-total-energy", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_total_energy); scm_c_define_gsubr("meep-fields-field-energy-in-box", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_field_energy_in_box); scm_c_define_gsubr("meep-fields-field-energy", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_field_energy); scm_c_define_gsubr("meep-fields-flux-in-box-wrongH", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_flux_in_box_wrongH); scm_c_define_gsubr("meep-fields-flux-in-box", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_flux_in_box); scm_c_define_gsubr("meep-fields-add-flux-vol", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_flux_vol); scm_c_define_gsubr("meep-fields-add-flux-plane", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_flux_plane); scm_c_define_gsubr("meep-fields-electric-energy-max-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_max_in_box); scm_c_define_gsubr("meep-fields-modal-volume-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_modal_volume_in_box); scm_c_define_gsubr("meep-fields-electric-sqr-weighted-integral", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_sqr_weighted_integral); scm_c_define_gsubr("meep-fields-electric-energy-weighted-integral", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_weighted_integral); scm_c_define_gsubr("meep-fields-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_output_directory); scm_c_define_gsubr("meep-fields-verbose", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_verbose); scm_c_define_gsubr("meep-fields-count-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_count_volume); scm_c_define_gsubr("meep-fields-have-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_have_component); scm_c_define_gsubr("meep-fields-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_max_eps); scm_c_define_gsubr("meep-fields-step-boundaries", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_step_boundaries); scm_c_define_gsubr("meep-fields-nosize-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_nosize_direction); scm_c_define_gsubr("meep-fields-normal-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_normal_direction); scm_c_define_gsubr("meep-fields-casimir-stress-dct-integral", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_casimir_stress_dct_integral); scm_c_define_gsubr("meep-fields-set-solve-cw-omega", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_solve_cw_omega); scm_c_define_gsubr("meep-fields-unset-solve-cw-omega", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_unset_solve_cw_omega); scm_c_define_gsubr("meep-fields-get-field", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_field); scm_c_define_gsubr("meep-fields-get-chi1inv", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_chi1inv); scm_c_define_gsubr("meep-fields-locate-component-point", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_locate_component_point); SWIG_TypeClientData(SWIGTYPE_p_meep__flux_vol, (void *) &_swig_guile_clientdatameep_flux_vol); scm_c_define_gsubr("new-meep-flux-vol", 3, 0, 0, (swig_guile_proc) _wrap_new_meep_flux_vol); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__flux_vol->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_flux_vol; scm_c_define_gsubr("delete-meep-flux-vol", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_flux_vol); scm_c_define_gsubr("meep-flux-vol-update-half", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_update_half); scm_c_define_gsubr("meep-flux-vol-update", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_update); scm_c_define_gsubr("meep-flux-vol-flux", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_flux); scm_c_define_gsubr("meep-flux-vol-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_next_set); scm_c_define_gsubr("meep-flux-vol-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_next_get); scm_c_define_gsubr("meep-grace-type-XY", 0, 0, 0, (swig_guile_proc) _wrap_meep_grace_type_XY); scm_c_define_gsubr("meep-grace-type-ERROR-BARS", 0, 0, 0, (swig_guile_proc) _wrap_meep_grace_type_ERROR_BARS); SWIG_TypeClientData(SWIGTYPE_p_meep__grace, (void *) &_swig_guile_clientdatameep_grace); scm_c_define_gsubr("new-meep-grace", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_grace); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__grace->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_grace; scm_c_define_gsubr("delete-meep-grace", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_grace); scm_c_define_gsubr("meep-grace-new-set", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_new_set); scm_c_define_gsubr("meep-grace-new-curve", 1, 0, 0, (swig_guile_proc) _wrap_meep_grace_new_curve); scm_c_define_gsubr("meep-grace-set-legend", 2, 0, 0, (swig_guile_proc) _wrap_meep_grace_set_legend); scm_c_define_gsubr("meep-grace-set-range", 5, 0, 0, (swig_guile_proc) _wrap_meep_grace_set_range); scm_c_define_gsubr("meep-grace-output-point", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_output_point); scm_c_define_gsubr("meep-grace-output-out-of-order", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_output_out_of_order); scm_c_define_gsubr("meep-make-output-directory", 0, 0, 1, (swig_guile_proc) _wrap_meep_make_output_directory); scm_c_define_gsubr("meep-trash-output-directory", 1, 0, 0, (swig_guile_proc) _wrap_meep_trash_output_directory); scm_c_define_gsubr("meep-create-output-file", 2, 0, 0, (swig_guile_proc) _wrap_meep_create_output_file); scm_c_define_gsubr("meep-deal-with-ctrl-c", 0, 0, 1, (swig_guile_proc) _wrap_meep_deal_with_ctrl_c); scm_c_define_gsubr("interrupt", 0, 1, 0, (swig_guile_proc) _wrap_interrupt); scm_c_define_gsubr("meep-do-harminv", 0, 0, 1, (swig_guile_proc) _wrap_meep_do_harminv); scm_c_define_gsubr("meep-make-casimir-gfunc", 0, 0, 1, (swig_guile_proc) _wrap_meep_make_casimir_gfunc); scm_c_define_gsubr("meep-make-casimir-gfunc-kz", 4, 0, 0, (swig_guile_proc) _wrap_meep_make_casimir_gfunc_kz); scm_c_define_gsubr("meep-set-random-seed", 1, 0, 0, (swig_guile_proc) _wrap_meep_set_random_seed); scm_c_define_gsubr("meep-uniform-random", 2, 0, 0, (swig_guile_proc) _wrap_meep_uniform_random); scm_c_define_gsubr("meep-gaussian-random", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_random); scm_c_define_gsubr("meep-random-int", 2, 0, 0, (swig_guile_proc) _wrap_meep_random_int); scm_c_define_gsubr("meep-BesselJ", 2, 0, 0, (swig_guile_proc) _wrap_meep_BesselJ); scm_c_define_gsubr("meep-green2d", 8, 0, 0, (swig_guile_proc) _wrap_meep_green2d); scm_c_define_gsubr("meep-green3d", 8, 0, 0, (swig_guile_proc) _wrap_meep_green3d); scm_c_define_gsubr("MEEP-CTL-SWIG-HPP", 0, 0, 0, (swig_guile_proc) _wrap_MEEP_CTL_SWIG_HPP); scm_c_define_gsubr("vec-to-vector3", 1, 0, 0, (swig_guile_proc) _wrap_vec_to_vector3); scm_c_define_gsubr("vector3-to-vec", 1, 0, 0, (swig_guile_proc) _wrap_vector3_to_vec); scm_c_define_gsubr("set-dimensions", 1, 0, 0, (swig_guile_proc) _wrap_set_dimensions); scm_c_define_gsubr("make-structure", 0, 0, 1, (swig_guile_proc) _wrap_make_structure_rest); scm_c_define_gsubr("do-harminv", 5, 0, 0, (swig_guile_proc) _wrap_do_harminv); scm_c_define_gsubr("dft-flux-flux", 1, 0, 0, (swig_guile_proc) _wrap_dft_flux_flux); scm_c_define_gsubr("dft-force-force", 1, 0, 0, (swig_guile_proc) _wrap_dft_force_force); scm_c_define_gsubr("dft-ldos-ldos", 1, 0, 0, (swig_guile_proc) _wrap_dft_ldos_ldos); scm_c_define_gsubr("dft-ldos-F", 1, 0, 0, (swig_guile_proc) _wrap_dft_ldos_F); scm_c_define_gsubr("dft-ldos-J", 1, 0, 0, (swig_guile_proc) _wrap_dft_ldos_J); scm_c_define_gsubr("dft-near2far-farfield", 2, 0, 0, (swig_guile_proc) _wrap_dft_near2far_farfield); scm_c_define_gsubr("make-casimir-g", 0, 0, 1, (swig_guile_proc) _wrap_make_casimir_g); scm_c_define_gsubr("make-casimir-g-kz", 4, 0, 0, (swig_guile_proc) _wrap_make_casimir_g_kz); scm_c_define_gsubr("make-volume-list", 4, 0, 0, (swig_guile_proc) _wrap_make_volume_list); } #ifdef __cplusplus } #endif extern "C" { /* Linkage: simple */ } meep-1.3/libctl/meep.scm.in0000644000175400001440000013446112506314611012544 00000000000000; Copyright (C) 2005-2009 Massachusetts Institute of Technology ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; **************************************************************** ; Get the number of arguments to a function p. However, some ; older versions of Guile (e.g. 1.2) do not support the 'arity ; property, and procedure-property just returns false. In ; this case, we assume that the procedure returns 1 argument, ; as this is the most useful default for our purposes. Sigh. (define (procedure-num-args p) (let ((arity (procedure-property p 'arity))) (if arity (car arity) 1))) ; **************************************************************** ; Set print-ok? to whether or not we are the MPI master process. ; Also, MPI doesn't support interactive mode. However, don't try this ; if we are running within gen-ctl-io, as it won't work. (if (not (defined? 'output-source)) ; (a function defined by gen-ctl-io) (begin (set-param! print-ok? (zero? (meep-my-rank))) (set-param! interactive? (= 1 (meep-count-processors))))) ; **************************************************************** (define-input-var epsilon-input-file "" 'string) (define-class material-type no-parent) (define-class susceptibility no-parent (define-property sigma-offdiag (vector3 0 0 0) 'vector3) (define-property sigma-diag no-default 'vector3)) (define-class lorentzian-susceptibility susceptibility (define-property frequency no-default 'number) (define-property gamma no-default 'number)) (define-class drude-susceptibility susceptibility (define-property frequency no-default 'number) (define-property gamma no-default 'number)) (define-class noisy-lorentzian-susceptibility lorentzian-susceptibility (define-property noise-amp no-default 'number)) (define-class noisy-drude-susceptibility drude-susceptibility (define-property noise-amp no-default 'number)) (define polarizability lorentzian-susceptibility) ; backwards compat (define omega frequency) ; backwards compat (define (sigma x) (sigma-diag x x x)) (define-class medium material-type (define-property epsilon-diag (vector3 1 1 1) 'vector3) (define-property epsilon-offdiag (vector3 0 0 0) 'vector3) (define-property mu-diag (vector3 1 1 1) 'vector3) (define-property mu-offdiag (vector3 0 0 0) 'vector3) (define-property E-susceptibilities '() (make-list-type 'susceptibility)) (define-property H-susceptibilities '() (make-list-type 'susceptibility)) (define-property E-chi2-diag (vector3 0 0 0) 'vector3) (define-property E-chi3-diag (vector3 0 0 0) 'vector3) (define-property H-chi2-diag (vector3 0 0 0) 'vector3) (define-property H-chi3-diag (vector3 0 0 0) 'vector3) (define-property D-conductivity-diag (vector3 0 0 0) 'vector3) (define-property B-conductivity-diag (vector3 0 0 0) 'vector3) ) ; backwards compatibility: (define E-polarizations E-susceptibilities) (define H-polarizations H-susceptibilities) (define (epsilon eps) (epsilon-diag eps eps eps)) (define (mu m) (mu-diag m m m)) (define dielectric medium) ; old name for backwards compatibility (define polarizations E-polarizations) ; backwards compatibility ; useful shortcuts for isotropic conductivity (define (D-conductivity c) (D-conductivity-diag c c c)) (define (B-conductivity c) (B-conductivity-diag c c c)) ; shortcuts for isotropic nonlinearities (define (E-chi2 d) (E-chi2-diag d d d)) (define (E-chi3 d) (E-chi3-diag d d d)) (define (H-chi2 d) (H-chi2-diag d d d)) (define (H-chi3 d) (H-chi3-diag d d d)) (define chi2 E-chi2) (define chi3 E-chi3) ; backwards compatibility (define-class perfect-metal material-type) ; arbitrary material(x) (define-class material-function material-type (define-property material-func no-default 'function (lambda (p) (= 1 (procedure-num-args p))))) (define (epsilon-func f) ; convenience wrapper (material-func (lambda (p) (make dielectric (epsilon (f p)))))) (define (index n) (epsilon (* n n))) ; convenient substitute for epsilon ; use the solid geometry classes, variables, etcetera in libgeom: ; (one specifications file can include another specifications file) (include "@LIBCTL_DIR@/utils/geom.scm") (if (defined? 'meep-component-Ex) (include "meep-enums.scm")) (define CYLINDRICAL -2) ; special value of dimensions for cylindrical coords (define AUTOMATIC -1) ; special value for directions, when auto-determined ; **************************************************************** ; Multilevel-atom nonlinear susceptibilities ;(define-class transition no-parent ; (define-property from-level no-default 'integer non-negative?) ; (define-property to-level no-default 'integer non-negative?) ; (define-property transition-rate 0 'number) ; nonradiative rate (0 if none) ; (define-property frequency 0 'number) ; radiative frequency (0 if none) ; (define-property sigma-diag (vector3 1 1 1) 'vector3) ; per-transition sigma ; (define-property gamma 0 'number)) ; optical damping rate ;(define (transition-time t) (transition-rate (/ t))) ;(define-class multilevel-atom susceptibility ; (define-property initial-populations '() (make-list-type 'number)) ; (define-property transitions '() (make-list-type 'transition))) ; **************************************************************** ; Add some predefined variables, for convenience: (define vacuum (make dielectric (epsilon 1.0))) (define air vacuum) (define metal (make perfect-metal)) (define perfect-electric-conductor metal) (define perfect-magnetic-conductor (make medium (mu (/ -0.0)))) ; -infinity (define infinity 1.0e20) ; big number for infinite dimensions of objects (set! default-material vacuum) (define pi (* 4.0 (atan 1.0))) ; **************************************************************** ; some utilities ; round x to dig digits after the decimal place (define (round-dig dig x) (/ (round (* x (expt 10 dig))) (expt 10 dig))) ; display a comma-delimited list of values, prefixed by the data-name ; and the run index, with data a list of values. (define-param run-index 0) (define (display-run-data data-name data) (print data-name run-index ":") (map (lambda (v) (print ", " v)) data) (print "\n")) ; display a list of data arrays (all required to be of same length) ; as comma-separated values, prefixed with name (and the run index). (define (display-csv name . ds) (if (not (null? ds)) (apply map (cons (lambda (. vs) (display-run-data name vs)) ds)))) ; **************************************************************** ; More input variables ; list of extra materials not explicit in the geometry, e.g. those ; used in material-functions, so that Meep doesn't miss them (define-param extra-materials '()) (define structure '()) ; list of sources added by init-fields (below) (define-param sources '()) (define-param m 0) ; angular dependence exp(i m phi) in cylindrical ; If false (default), Meep forces certain field components for |m|>1 to ; be zero for |m| pixels from r=0. This is something of a hack ; which seems to ensure stability for Courant = 0.5 regardless of m, ; at the expense of some accuracy near r=0. If true, in order to ; remain stable, the Courant factor should be ~ min[0.5, 1 / (|m| + 0.5)] ; or so assuming the computational cell includes the r=0 origin. (define-param accurate-fields-near-cylorigin? false) (define-param force-complex-fields? false) (define-param k-point false) ; whether to use the "beta" trick to handle kz in 2d ; -- this is not true by default because its use changes ; the interpretation of the fields somewhat (for real fields), ; and it only works in 2d right now. (define-param special-kz? false) (define fields '()) (define-param subpixel-tol 1e-4) (define-param subpixel-maxeval 100000) ; a "global" conductivity to add to all materials, mostly ; for the convenience of Casimir calculations (define-param global-D-conductivity 0) (define-param global-B-conductivity 0) ; **************************************************************** ; Setting up the structure (define-class symmetry no-parent (define-property direction no-default 'integer) (define-property phase 1.0 'cnumber)) (define-class rotate2-sym symmetry) (define-class rotate4-sym symmetry) (define-class mirror-sym symmetry) (define ALL -1) ; special value for directions, when all values (define-class pml no-parent (define-property thickness no-default 'number) (define-property direction ALL 'integer) (define-property side ALL 'integer) (define-property strength 1.0 'number) ; obsolete: R -> R^strength (define-property R-asymptotic 1e-15 'number positive?) (define-property mean-stretch 1.0 'number (lambda (x) (>= x 1.0))) (define-property pml-profile (lambda (u) (* u u)) 'function)) (define-class absorber pml) ; just a scalar conductivity ramp (export-type (make-list-type 'symmetry)) (export-type (make-list-type 'pml)) (export-type (make-list-type 'material-type)) (define-param symmetries '()) (define-param pml-layers '()) (define-param num-chunks 0) (define-param Courant 0.5) (define (infer-dimensions k) (if (and (not (null? k)) (= dimensions 3)) ; infer dimensions (if (and (= (vector3-z (object-property-value geometry-lattice 'size)) no-size) (or (not k) special-kz? (zero? (vector3-z k)))) 2 3) dimensions)) (define (require-dimensions!) (if (null? structure) (set-dimensions (infer-dimensions k-point)))) (define-class volume-class no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3)) (define (volume . args) (require-dimensions!) (let ((v (apply make (cons volume-class args)))) (let ((cen (object-property-value v 'center)) (sz (object-property-value v 'size))) (new-meep-volume (vector3- cen (vector3-scale 0.5 sz)) (vector3+ cen (vector3-scale 0.5 sz)))))) (define-param eps-averaging? true) ; 10% slower, but huge accuracy gains (define (init-structure . k_) (let ((k (if (null? k_) '() (car k_))) (s (object-property-value geometry-lattice 'size))) (set! structure (make-structure (infer-dimensions k) s geometry-center resolution eps-averaging? subpixel-tol subpixel-maxeval (and ensure-periodicity (not (not k))) geometry extra-materials default-material epsilon-input-file pml-layers symmetries num-chunks Courant global-D-conductivity global-B-conductivity)))) ; **************************************************************** ; Adding sources (define-class src-time no-parent (define-property is-integrated? false 'boolean)) (define-class continuous-src src-time (define-property frequency no-default 'number) (define-property start-time 0 'number) (define-property end-time infinity 'number) (define-property width 0 'number) (define-property cutoff 3.0 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-continuous-src-time (* 1.0 (object-property-value o 'frequency)) (object-property-value o 'width) (object-property-value o 'start-time) (object-property-value o 'end-time) (object-property-value o 'cutoff)))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define-class gaussian-src src-time (define-property frequency no-default 'number) (define-property width no-default 'number) (define-property start-time 0 'number) (define-property cutoff 5.0 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-gaussian-src-time (* 1.0 (object-property-value o 'frequency)) (object-property-value o 'width) (object-property-value o 'start-time) (+ (object-property-value o 'start-time) (* 2 (object-property-value o 'width) (object-property-value o 'cutoff)))))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define-class custom-src src-time (define-property src-func no-default 'function) (define-property start-time (- infinity) 'number) (define-property end-time infinity 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-custom-src-time (object-property-value o 'src-func) (object-property-value o 'start-time) (object-property-value o 'end-time)))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define (fwidth df) (width (/ df))) ; to specify frequency width instead (define (wavelength lam) (frequency (/ lam))) (define (period T) (frequency (/ T))) (define-class source no-parent (define-property src no-default 'src-time) (define-property component no-default 'integer) (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property amplitude 1.0 'cnumber) (define-property amp-func '() 'SCM)) ; the following definitions are taken from MPB (define NO-PARITY 0) (define EVEN-Z 1) (define ODD-Z 2) (define EVEN-Y 4) (define ODD-Y 8) (define TE EVEN-Z) (define TM ODD-Z) ; special component for eigenmode-source (not defined during gen-ctl-io) (define ALL-COMPONENTS (if (defined? 'Dielectric) Dielectric 99)) (define-class eigenmode-source source ; the following two properties have special default values -- if we ; detect these values, we will replace the values by those of the ; size and center of the parent class (a bit hackish, but...) (define-property eig-lattice-size (vector3 -1 -1 -1) 'vector3) (define-property eig-lattice-center (vector3 infinity infinity infinity) 'vector3) (define-property component ALL-COMPONENTS 'integer) ; new default val (define-property direction AUTOMATIC 'integer) (define-property eig-band 1 'integer positive?) (define-property eig-kpoint (vector3 0) 'vector3) (define-property eig-match-freq? true 'boolean) (define-property eig-parity NO-PARITY 'integer) (define-property eig-resolution 0 'integer non-negative?) (define-property eig-tolerance 1e-7 'number positive?)) (define (add-source s f) ; add source s to fields f (define (dflt v v0 vd) (if (vector3= v v0) vd v)) (let ((A (object-property-value s 'amp-func)) (cen (object-property-value s 'center)) (sz (object-property-value s 'size))) (if (object-member? 'eigenmode-source s) (let* ((ecen (dflt (object-property-value s 'eig-lattice-center) (vector3 infinity infinity infinity) cen)) (esz (dflt (object-property-value s 'eig-lattice-size) (vector3 -1 -1 -1) sz)) (v (volume (center cen) (size sz))) (d0 (object-property-value s 'direction)) (d (if (negative? d0) (meep-fields-normal-direction fields v) d0))) (if (null? A) (meep-fields-add-eigenmode-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) d v (volume (center ecen) (size esz)) (object-property-value s 'eig-band) (object-property-value s 'eig-kpoint) (object-property-value s 'eig-match-freq?) (object-property-value s 'eig-parity) (object-property-value s 'eig-resolution) (object-property-value s 'eig-tolerance) (object-property-value s 'amplitude)) (meep-fields-add-eigenmode-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) d v (volume (center ecen) (size esz)) (object-property-value s 'eig-band) (object-property-value s 'eig-kpoint) (object-property-value s 'eig-parity) (object-property-value s 'eig-resolution) (object-property-value s 'eig-tolerance) (object-property-value s 'amplitude) A))) (if (null? A) (meep-fields-add-volume-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) (* 1.0 (object-property-value s 'amplitude))) (meep-fields-add-volume-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) A (* 1.0 (object-property-value s 'amplitude))))))) ; **************************************************************** ; Setting up the fields (define init-fields-hooks '()) ; list of thunks to execute after init-fields (define (init-fields) (if (null? structure) (init-structure k-point)) (set! fields (new-meep-fields structure (if (= dimensions CYLINDRICAL) m 0) (if (and special-kz? k-point) (vector3-z k-point) 0.0) (not accurate-fields-near-cylorigin?))) (if verbose? (meep-fields-verbose fields)) (if (not (or force-complex-fields? (and (= dimensions CYLINDRICAL) (not (zero? m))) (not (for-all? symmetries (lambda (s) (zero? (imag-part (object-property-value s 'phase)))))) (not (or (not k-point) (and special-kz? (= (vector3-x k-point) 0) (= (vector3-y k-point) 0)) (vector3= k-point (vector3 0)))))) (meep-fields-use-real-fields fields) (print "Meep: using complex fields.\n")) (if k-point (meep-fields-use-bloch fields (if special-kz? (vector3 (vector3-x k-point) (vector3-y k-point)) k-point))) (map (lambda (s) (add-source s fields)) sources) (map (lambda (thunk) (thunk)) init-fields-hooks)) (define (meep-time) (if (null? fields) (init-fields)) (meep-fields-time fields)) (define (meep-round-time) (if (null? fields) (init-fields)) (meep-fields-round-time fields)) (define (get-field-point c pt) (meep-fields-get-field fields c pt)) (define (get-epsilon-point pt) (meep-fields-get-eps fields pt)) ; **************************************************************** ; Various ways to restart all or part of the simulation. (define (change-k-point! k) (set! k-point k) (if (not (null? fields)) (if (and (not (or (not k-point) (vector3= k-point (vector3 0)))) (not (zero? (meep-fields-is-real-get fields)))) (begin (delete-meep-fields fields) (set! fields '()) (init-fields)) (if k-point (meep-fields-use-bloch fields k-point))))) (define (change-sources! new-sources) (set! sources new-sources) (if (not (null? fields)) (begin (meep-fields-remove-sources fields) (map (lambda (s) (add-source s fields)) sources)))) (define (reset-meep) (delete-meep-fields fields) (set! fields '()) (delete-meep-structure structure) (set! structure '())) (define (restart-fields) (if (not (null? fields)) (begin (meep-fields-t-set fields 0) (meep-fields-zero-fields fields)) (init-fields))) ; **************************************************************** ; Flux spectra (define-class flux-region no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property direction AUTOMATIC 'integer) (define-property weight 1.0 'cnumber)) (define (fields-add-fluxish-stuff add-dft-stuff fields fcen df nfreq stufflist) (define vl '()) ; volume_list of flux regions (map (lambda (f) (let* ((v (volume (center (object-property-value f 'center)) (size (object-property-value f 'size)))) (d0 (object-property-value f 'direction)) (d (if (negative? d0) (meep-fields-normal-direction fields v) d0)) (c (meep-direction-component Sx d))) (set! vl (make-volume-list (volume (center (object-property-value f 'center)) (size (object-property-value f 'size))) c (object-property-value f 'weight) vl)))) stufflist) (let ((stuff (add-dft-stuff fields vl (- fcen (/ df 2)) (+ fcen (/ df 2)) nfreq))) (delete-meep-volume-list vl) stuff)) (define (fields-add-flux fields fcen df nfreq . fluxes) (fields-add-fluxish-stuff meep-fields-add-dft-flux fields fcen df nfreq fluxes)) (define (add-flux fcen df nfreq . fluxes) (if (null? fields) (init-fields)) (apply fields-add-flux (append (list fields fcen df nfreq) fluxes))) (define (scale-flux-fields s f) (meep-dft-flux-scale-dfts f s)) (define (get-flux-freqs f) (arith-sequence (meep-dft-flux-freq-min-get f) (meep-dft-flux-dfreq-get f) (meep-dft-flux-Nfreq-get f))) (export-type (make-list-type 'number)) (define (get-fluxes f) (dft-flux-flux f)) (define (display-fluxes . fluxes) (if (not (null? fluxes)) (apply display-csv (append (list "flux" (get-flux-freqs (car fluxes))) (map get-fluxes fluxes))))) (define (load-flux fname flux) (if (null? fields) (init-fields)) (meep-dft-flux-load-hdf5 flux fields fname "" (get-filename-prefix))) (define (save-flux fname flux) (if (null? fields) (init-fields)) (meep-dft-flux-save-hdf5 flux fields fname "" (get-filename-prefix))) (define (load-minus-flux fname flux) (load-flux fname flux) (meep-dft-flux-scale-dfts flux -1.0)) ; **************************************************************** ; Force spectra (from stress tensor) - very similar interface to flux spectra (define-class force-region no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property direction no-default 'integer) (define-property weight 1.0 'cnumber)) (define (fields-add-force fields fcen df nfreq . forcees) (fields-add-fluxish-stuff meep-fields-add-dft-force fields fcen df nfreq forcees)) (define (add-force fcen df nfreq . forcees) (if (null? fields) (init-fields)) (apply fields-add-force (append (list fields fcen df nfreq) forcees))) (define (scale-force-fields s f) (meep-dft-force-scale-dfts f s)) (define (get-force-freqs f) (arith-sequence (meep-dft-force-freq-min-get f) (meep-dft-force-dfreq-get f) (meep-dft-force-Nfreq-get f))) (define (get-forces f) (dft-force-force f)) (define (display-forces . forcees) (if (not (null? forcees)) (apply display-csv (append (list "force" (get-force-freqs (car forcees))) (map get-forces forcees))))) (define (load-force fname force) (if (null? fields) (init-fields)) (meep-dft-force-load-hdf5 force fields fname "" (get-filename-prefix))) (define (save-force fname force) (if (null? fields) (init-fields)) (meep-dft-force-save-hdf5 force fields fname "" (get-filename-prefix))) (define (load-minus-force fname force) (load-force fname force) (meep-dft-force-scale-dfts force -1.0)) ; **************************************************************** ; Near-to-far-field transformations (again similar to dft-foobar) (define-class near2far-region no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property direction AUTOMATIC 'integer) (define-property weight 1.0 'cnumber)) (define (fields-add-near2far fields fcen df nfreq . near2fars) (fields-add-fluxish-stuff meep-fields-add-dft-near2far fields fcen df nfreq near2fars)) (define (add-near2far fcen df nfreq . near2fars) (if (null? fields) (init-fields)) (apply fields-add-near2far (append (list fields fcen df nfreq) near2fars))) (define (scale-near2far-fields s f) (meep-dft-near2far-scale-dfts f s)) (define (get-near2far-freqs f) (arith-sequence (meep-dft-near2far-freq-min-get f) (meep-dft-near2far-dfreq-get f) (meep-dft-near2far-Nfreq-get f))) (define (get-farfield f x) (dft-near2far-farfield f x)) (define (output-farfields near2far fname where resolution) (meep-dft-near2far-save-farfields near2far fname (get-filename-prefix) where resolution)) (define (load-near2far fname near2far) (if (null? fields) (init-fields)) (meep-dft-near2far-load-hdf5 near2far fields fname "" (get-filename-prefix))) (define (save-near2far fname near2far) (if (null? fields) (init-fields)) (meep-dft-near2far-save-hdf5 near2far fields fname "" (get-filename-prefix))) (define (load-minus-near2far fname near2far) (load-near2far fname near2far) (meep-dft-near2far-scale-dfts near2far -1.0)) ; **************************************************************** ; Generic step functions: these are functions which are called ; (potentially) at every time step. They can either be a thunk ; or they can take one argument, to-do. to-do is either 'step ; or 'finish, where 'step means to output (or whatever) ; normally, and 'finish is passed once at the end of the run ; (and is used to close files, print summary output, etcetera). ; step functions can be either thunks (the common case), or ; can take a "to-do" argument that is currently either 'step ; or 'finish (so that they can clean up at the end of a run). (define (eval-step-func func to-do) (if (= 0 (procedure-num-args func)) (if (eq? to-do 'step) (func)) (func to-do))) ; Some convenient wrappers for step functions passed to run. e.g., these ; can be used to only output at certain times, instead of ata every time step. (define (combine-step-funcs . step-funcs) (lambda (to-do) (map (lambda (f) (eval-step-func f to-do)) step-funcs))) ; generic wrapper (define (when-true-funcs cond? step-funcs) (lambda (to-do) (if (or (eq? to-do 'finish) (cond?)) (map (lambda (f) (eval-step-func f to-do)) step-funcs)))) ; evaluate step-funcs whenever (cond?) is true/false. (define (when-true cond? . step-funcs) (when-true-funcs cond? step-funcs)) (define (when-false cond? . step-funcs) (when-true-funcs (lambda () (not (cond?))) step-funcs)) ; output at an interval of dT (in meep/simulation time). (define (at-every dT . step-funcs) (if (null? fields) (init-fields)) (let ((Tlast (meep-round-time))) (lambda (to-do) (let ((T (meep-round-time))) (if (or (eq? to-do 'finish) (>= T (+ Tlast dT (* -0.5 (meep-fields-dt-get fields))))) (begin (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! Tlast T))))))) (define (after-time T . step-funcs) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time))) (when-true-funcs (lambda () (>= (meep-round-time) (+ T0 T))) step-funcs))) (define (before-time T . step-funcs) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time))) (when-true-funcs (lambda () (< (meep-round-time) (+ T0 T))) step-funcs))) (define (at-time T . step-funcs) (let ((done? false)) (after-time T (lambda (to-do) (if (or (not done?) (eq? to-do 'finish)) (map (lambda (f) (eval-step-func f to-do)) step-funcs)) (set! done? (or done? (eq? to-do 'step))))))) (define (after-sources . step-funcs) (if (null? fields) (init-fields)) (apply after-time (cons (- (meep-fields-last-source-time fields) (meep-round-time)) step-funcs))) ; after sources plus a time T. (define (after-sources+ T . step-funcs) (if (null? fields) (init-fields)) (apply after-time (cons (- (+ (meep-fields-last-source-time fields) T) (meep-round-time)) step-funcs))) (define (during-sources . step-funcs) (if (null? fields) (init-fields)) (apply before-time (cons (- (meep-fields-last-source-time fields) (meep-round-time)) step-funcs))) ; the user could just call functions, but this functions saves the user ; from having to manually call init-fields (define (at-beginning . step-funcs) (let ((done? false)) (lambda (to-do) (if (not done?) (begin (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! done? true)))))) ; for completeness (although the user could just do this after running): (define (at-end . step-funcs) (lambda (to-do) (if (eq? to-do 'finish) (begin (map (lambda (f) (eval-step-func f 'step)) step-funcs) (map (lambda (f) (eval-step-func f 'finish)) step-funcs))))) ; run the step-funcs with the magnetic fields synchronized in time ; with the electric fields (define (synchronized-magnetic . step-funcs) (lambda (to-do) (meep-fields-synchronize-magnetic-fields fields) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (meep-fields-restore-magnetic-fields fields))) ; **************************************************************** ; File output functions (can only be called after init-fields). (define-param filename-prefix "") (define (get-filename-prefix) (if (eq? filename-prefix false) "" (if (and (not (null? include-files)) (string-null? filename-prefix)) (string-append (strip-suffix ".scm" (strip-suffix ".ctl" (cdr (split-pathname (car include-files)))))) filename-prefix))) ; Use output directory instead of outputting in same directory; ; uses init-fields-hooks to handle fields not yet initted. (define (use-output-directory . dname_) (let ((dname (if (null? dname_) (string-append (get-filename-prefix) "-out") (car dname_)))) (let ((hook (let ((trashed? false)) ; only trash output directory once per run (lambda () (print "Meep: using output directory \"" dname "\"\n") (meep-fields-set-output-directory fields dname) (if (not trashed?) (meep-trash-output-directory dname)) (set! trashed? true))))) (set! init-fields-hooks (cons hook init-fields-hooks)) (if (not (null? fields)) (hook)) (set! filename-prefix false) dname))) (define-param output-volume '()) ; region to output; NULL for everywhere (define output-append-h5 '()) ; h5 file to append data to (NULL if none) ; hook function called with the filename after every HDF5 files is created; ; this can be used to convert the file into other formats, etcetera. (define output-h5-hook (lambda (fname) false)) ; default is no-op (define output-single-precision? false) ; output single-prec to save space (define meep-last-eps-filename "") ; most recent epsilon file outputted (define (output-component c . h5file) (if (null? fields) (error "init-fields is required before output-component")) (meep-fields-output-hdf5 fields c (if (null? output-volume) (meep-fields-total-volume fields) output-volume) (if (null? h5file) output-append-h5 (car h5file)) (and (null? h5file) (not (null? output-append-h5))) output-single-precision? (get-filename-prefix)) (if (null? h5file) (let ((nm (meep-fields-h5file-name fields (meep-component-name c) (get-filename-prefix) true))) (if (eq? c Dielectric) (set! meep-last-eps-filename nm)) (output-h5-hook nm)))) ; cs = list of components, and func is function of position & these components (define (output-field-function-helper name cs func real-only? h5file) (if (null? fields) (error "init-fields is required before output-field-function")) (meep-fields-output-hdf5 fields name (cons cs func) (if (null? output-volume) (meep-fields-total-volume fields) output-volume) (if (null? h5file) output-append-h5 (car h5file)) (and (null? h5file) (not (null? output-append-h5))) output-single-precision? (get-filename-prefix) real-only?) (if (null? h5file) (output-h5-hook (meep-fields-h5file-name fields name (get-filename-prefix) true)))) (define (output-field-function name cs func . h5file) (output-field-function-helper name cs func false h5file)) (define (output-real-field-function name cs func . h5file) (output-field-function-helper name cs func true h5file)) (define (output-components fname . cs) (if (null? fields) (error "init-fields is required before output-component")) (let ((f (if (null? output-append-h5) (list (meep-fields-open-h5file fields fname (meep-h5file-WRITE) (get-filename-prefix) true)) '()))) (map (lambda (c) (apply output-component (cons c f)) (if (null? output-append-h5) (meep-h5file-prevent-deadlock (car f)))) cs) (if (null? output-append-h5) (delete-meep-h5file (car f)))) (if (null? output-append-h5) (output-h5-hook (meep-fields-h5file-name fields fname (get-filename-prefix) true)))) ; convenience functions, similar to MPB: (define (output-epsilon) (output-component Dielectric)) (define (output-mu) (output-component Permeability)) (define (output-hpwr) (output-component H-EnergyDensity)) (define (output-dpwr) (output-component D-EnergyDensity)) (define (output-tot-pwr) (output-component EnergyDensity)) (defmacro-public define-output-field (name cp CP) `(begin (define (,(symbol-append 'output- cp)) (output-components ,name ,(symbol-append CP 'x) ,(symbol-append CP 'y) ,(symbol-append CP 'z) ,(symbol-append CP 'r) ,(symbol-append CP 'p))) (define (,(symbol-append 'output- cp '-x)) (output-component ,(symbol-append CP 'x))) (define (,(symbol-append 'output- cp '-y)) (output-component ,(symbol-append CP 'y))) (define (,(symbol-append 'output- cp '-z)) (output-component ,(symbol-append CP 'z))) (define (,(symbol-append 'output- cp '-r)) (output-component ,(symbol-append CP 'r))) (define (,(symbol-append 'output- cp '-p)) (output-component ,(symbol-append CP 'p))))) (define-output-field "h" hfield H) (define-output-field "b" bfield B) (define-output-field "e" efield E) (define-output-field "d" dfield D) (define-output-field "s" poynting S) ; compat. with MPB. (define-output-field "s" sfield S) (define (with-prefix pre . step-funcs) (lambda (to-do) (let ((pre-save filename-prefix)) (set! filename-prefix (string-append pre (get-filename-prefix))) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! filename-prefix pre-save)))) ; change output-volume for a few step-funcs to v (define (in-volume v . step-funcs) (let ((cur-eps "")) ; allow per-volume eps filenames (lambda (to-do) (let ((v-save output-volume) (eps-save meep-last-eps-filename)) (set! output-volume v) (if (not (string-null? cur-eps)) (set! meep-last-eps-filename cur-eps)) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! cur-eps meep-last-eps-filename) (set! output-volume v-save) (if (not (string-null? eps-save)) (set! meep-last-eps-filename eps-save)))))) (define (in-point pt . step-funcs) (apply in-volume (cons (volume (center pt)) step-funcs))) ; Meep supports outputting d+1 dimensional HDF5 files where the last ; dimension is time. (define (to-appended fname . step-funcs) (if (null? fields) (init-fields)) (let ((h5 (meep-fields-open-h5file fields fname (meep-h5file-WRITE) (get-filename-prefix)))) (lambda (to-do) (let ((h5save output-append-h5)) (set! output-append-h5 h5) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (if (eq? to-do 'finish) (begin (delete-meep-h5file h5) (output-h5-hook (meep-fields-h5file-name fields fname (get-filename-prefix))))) (set! output-append-h5 h5save))))) (define (convert-h5 rm? convert-cmd . step-funcs) (define (convert fname) (if (zero? (meep-my-rank)) (if (and (zero? (system (string-append convert-cmd " \"" fname "\""))) rm?) (system (string-append "rm \"" fname "\""))))) (lambda (to-do) (let ((hooksave output-h5-hook)) (set! output-h5-hook convert) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! output-h5-hook hooksave)))) (define (h5topng rm? options . step-funcs) (apply convert-h5 (cons rm? (cons (string-append "EPS=\"" meep-last-eps-filename "\"; " "h5topng " options) step-funcs)))) (define (output-png-rm? rm? c options) (let ((maxabs 0.0)) ; keep track of amplitude for image scaling (lambda (to-do) (if (eq? to-do 'step) (begin (set! maxabs (max maxabs (meep-fields-max-abs fields c (if (null? output-volume) (meep-fields-total-volume fields) output-volume)))) ((h5topng rm? (string-append "-M " (number->string maxabs) " " options) (lambda () (output-component c))) to-do)))))) (define (output-png c options) (output-png-rm? true c options)) (define (output-png+h5 c options) (output-png-rm? false c options)) ; **************************************************************** ; harminv functions for extracting bands, etcetera ; for do-harminv (export-type (make-list-type 'cnumber)) (export-type (make-list-type 'cvector3)) ; generic data-collection function (defmacro-public collect-harminv! (data data-dt) `(lambda (c pt) (set! ,data '()) (let ((t0 0)) (lambda () (set! ,data-dt (- (meep-time) t0)) (set! t0 (meep-time)) (set! ,data (cons (get-field-point c pt) ,data)))))) ; do-harminv returns a (freq, amp, err) vector3; define accessor functions: (define harminv-freq vector3-x) (define (harminv-freq-re b) (real-part (vector3-x b))) (define (harminv-freq-im b) (imag-part (vector3-x b))) (define (harminv-Q b) (/ (harminv-freq-re b) (* -2 (harminv-freq-im b)))) (define harminv-amp vector3-y) (define harminv-err vector3-z) (define (analyze-harminv data fcen df maxbands . dt) (display-run-data "harminv" (list "frequency" "imag. freq." "Q" "|amp|" "amplitude" "error")) (let ((bands (do-harminv data (if (null? dt) (meep-fields-dt-get fields) (car dt)) (- fcen (/ df 2)) (+ fcen (/ df 2)) maxbands))) (map (lambda (b) ; b = vector of (freq, amp, error) (display-run-data "harminv" (list (harminv-freq-re b) (harminv-freq-im b) (harminv-Q b) (magnitude (harminv-amp b)) (harminv-amp b) (harminv-err b)))) bands) bands)) (defmacro-public harminv! (data dt results c pt fcen df maxbands) `(let ((data' '()) (dt' 0) (c' ,c) (pt' ,pt) (fcen' ,fcen) (df' ,df) (maxbands' ,maxbands)) (combine-step-funcs (at-end (lambda () (set! ,data (reverse data')) ; put in correct order (set! ,dt dt') (set! ,results (analyze-harminv ,data fcen' df' (if (list? maxbands') (if (null? maxbands') 100 (car maxbands')) (if (zero? maxbands') 100 maxbands')) dt')))) ((collect-harminv! data' dt') c' pt')))) ; collect in harminv-data + analyze and store in harminv-results (define harminv-data '()) (define harminv-data-dt 0) (define harminv-results '()) (define (harminv c pt fcen df . mxbands) (harminv! harminv-data harminv-data-dt harminv-results c pt fcen df mxbands)) ; **************************************************************** ; dft-ldos step function (define dft-ldos-data '()) (define dft-ldos-Fdata '()) (define dft-ldos-Jdata '()) (define (get-ldos-freqs f) (arith-sequence (/ (meep-dft-ldos-omega-min-get f) (* 2 pi)) (/ (meep-dft-ldos-domega-get f) (* 2 pi)) (meep-dft-ldos-Nomega-get f))) (define (dft-ldos fcen df nfreq) (let ((ldos (new-meep-dft-ldos (- fcen (/ df 2)) (+ fcen (/ df 2)) nfreq))) (lambda (to-do) (if (eq? to-do 'step) (meep-dft-ldos-update ldos fields) (begin (set! dft-ldos-data (dft-ldos-ldos ldos)) (set! dft-ldos-Fdata (dft-ldos-F ldos)) (set! dft-ldos-Jdata (dft-ldos-J ldos)) (display-csv "ldos" (get-ldos-freqs ldos) dft-ldos-data)))))) ; **************************************************************** ; run functions ; default time interval (seconds) between progress printouts (define-param progress-interval 4) ; display progress from T0 until T, every dt seconds (wall time) (define (display-progress T0 T dt) (let ((t0 (meep-wall-time)) (tlast (meep-wall-time))) (lambda () (let ((t (meep-wall-time))) (if (>= (- t tlast) dt) (begin (print "Meep progress: " (- (meep-time) T0) "/" T " = " (round-dig 1 (/ (- (meep-time) T0) (* 0.01 T))) "% done" " in " (round-dig 1 (- t t0)) "s, " (round-dig 1 ( - (* (- t t0) (/ T (- (meep-time) T0))) (- t t0))) "s to go\n") (set! tlast t))))))) ; run until (cond?) is true or, if cond? is a number, until time cond? ; (in Meep units) has elapsed, calling step-funcs at every time step. (define (run-until cond? . step-funcs) (set! interactive? false) (if (null? fields) (init-fields)) (if (number? cond?) ; cond? is a time to run for (let ((T0 (meep-round-time))) ; current Meep time (apply run-until (cons (lambda () (>= (meep-round-time) (+ T0 cond?))) (cons (display-progress T0 (+ T0 cond?) progress-interval) step-funcs)))) (begin ; otherwise, cond? is a boolean thunk (map (lambda (f) (eval-step-func f 'step)) step-funcs) (if (cond?) (begin (map (lambda (f) (eval-step-func f 'finish)) step-funcs) (print "run " run-index " finished at t = " (meep-time) " (" (meep-fields-t-get fields) " timesteps)\n") (set! run-index (+ run-index 1))) (begin (meep-fields-step fields) (apply run-until (cons cond? step-funcs))))))) ; run until all sources are finished and cond? is true. If cond? is a number ; T, run until all sources are finished + a time T. (define (run-sources+ cond? . step-funcs) (if (null? fields) (init-fields)) (let ((Ts (meep-fields-last-source-time fields))) (apply run-until (cons (if (number? cond?) (+ (- Ts (meep-round-time)) cond?) (lambda () (and (cond?) (>= (meep-round-time) Ts)))) step-funcs)))) ; run until all sources are finished (define (run-sources . step-funcs) (apply run-sources+ (cons 0 step-funcs))) ; condition function, designed to be used in conjunction with run-sources+, ; that returns true when |field|^2 at a given point has decayed more than ; a certain amount, always running for at least steps of dT. (define (stop-when-fields-decayed dT c pt decay-by) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time)) (max-abs (sqr (magnitude (meep-fields-get-field fields c pt)))) (cur-max 0)) (lambda () (let ((fabs (sqr (magnitude (meep-fields-get-field fields c pt))))) (set! cur-max (max cur-max fabs)) (if (<= (meep-round-time) (+ T0 dT)) false ; don't stop yet (let ((old-cur cur-max)) (set! cur-max 0) (set! T0 (meep-round-time)) (set! max-abs (max max-abs old-cur)) (if (not (zero? max-abs)) (print "field decay(t = " (meep-time)"): " old-cur " / " max-abs " = " (/ old-cur max-abs) "\n")) (<= old-cur (* max-abs decay-by)))))))) ; **************************************************************** ; band diagrams (define (run-k-point T k) (define cs (map (lambda (o) (object-property-value o 'component)) sources)) (define pts (map (lambda (o) (object-property-value o 'center)) sources)) (define As (map (lambda (o) (object-property-value o 'amplitude)) sources)) (define fmin (max 0 (apply min (map (lambda (o) (let ((t (object-property-value o 'src))) (if (object-member? 'gaussian-src t) (- (object-property-value t 'frequency) (/ 1 (object-property-value t 'width) 2)) infinity))) sources)))) (define fmax (apply max (map (lambda (o) (let ((t (object-property-value o 'src))) (if (object-member? 'gaussian-src t) (+ (object-property-value t 'frequency) (/ 1 (object-property-value t 'width) 2)) 0))) sources))) (if (or (null? cs) (> fmin fmax)) (error "run-k-point requires a gaussian-src source")) ; TODO: apply harminv to multiple points and only accept freqs ; with correct relative amplitudes? (change-k-point! k) (restart-fields) (run-sources+ T (after-sources (harminv (car cs) (car pts) (* 0.5 (+ fmin fmax)) (- fmax fmin)))) (map harminv-freq harminv-results)) (define (run-k-points T k-points) (define k-index 0) (define all-freqs '()) (map (lambda (k) (set! k-index (+ k-index 1)) (if (= k-index 1) (begin (init-fields) (output-epsilon))) (let ((freqs (run-k-point T k))) (print "freqs:, " k-index ", " (vector3-x k) ", " (vector3-y k) ", " (vector3-z k)) (map (lambda (x) (print ", " x)) (map real-part freqs)) (print "\n") (print "freqs-im:, " k-index ", " (vector3-x k) ", " (vector3-y k) ", " (vector3-z k)) (map (lambda (x) (print ", " x)) (map imag-part freqs)) (print "\n") (set! all-freqs (cons freqs all-freqs)))) k-points) (reverse all-freqs)) ; **************************************************************** ; field integration (define (get-where-and-fields where-and-fields) (let ((f (if (= 2 (length where-and-fields)) (cadr where-and-fields) fields))) (if (null? f) (error "init-fields is required before using field functions")) (let ((where (if (null? where-and-fields) (meep-fields-total-volume f) (car where-and-fields)))) (cons where f)))) (define (integrate-field-function cs func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-integrate (cdr waf) (cons cs func) (car waf)))) (define (integrate2-field-function fields2 cs1 cs2 func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-integrate2 (cdr waf) fields2 (cons (cons cs1 cs2) func) (car waf)))) (define (max-abs-field-function cs func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-max-abs (cdr waf) (cons cs func) (car waf)))) (define (flux-in-box dir box) (if (null? fields) (error "init-fields is required before using flux-in-box")) (meep-fields-flux-in-box fields dir box)) (define (electric-energy-in-box box) (if (null? fields) (error "init-fields is required before using electric-energy-in-box")) (meep-fields-electric-energy-in-box fields box)) (define (magnetic-energy-in-box box) (if (null? fields) (error "init-fields is required before using magnetic-energy-in-box")) (meep-fields-magnetic-energy-in-box fields box)) (define (field-energy-in-box box) (if (null? fields) (error "init-fields is required before using field-energy-in-box")) (meep-fields-field-energy-in-box fields box)) ; **************************************************************** ; Load helper functions for Casimir-force calculations (if (defined? 'meep-component-Ex) (include "casimir.scm")) ; **************************************************************** ; Load GNU Readline support, for easier command-line editing support. ; This is not loaded in by default in Guile 1.3.2+ because readline is ; licensed under the GPL, which would have caused Guile to effectively ; be under the GPL itself. However, since Meep is under the GPL too, ; we can load Readline by default with no problems. @ACTIVATE_READLINE@ ; command to activate readline is determined by configure (ctl-set-prompt! "meep> ") ; **************************************************************** meep-1.3/libctl/meep.i0000644000175400001440000001514312322770314011602 00000000000000// -*- C++ -*- %module meep %{ #include "meep-ctl.hpp" static inline int SwigComplex_Check(SCM o) { return SCM_REALP(o) || SCM_COMPLEXP(o); } static inline int SwigVector3_Check(SCM o) { return SCM_VECTORP(o) && SCM_VECTOR_LENGTH(o) == 3; } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func_scm; static inline std::complex my_complex_func(meep::vec const &v) { SCM ret = gh_call1(my_complex_func_scm, ctl_convert_vector3_to_scm(vec_to_vector3(v))); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static inline std::complex my_complex_func2(double t, void *f) { SCM ret = gh_call1((SCM) f, ctl_convert_number_to_scm(t)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } typedef struct { SCM func; int nf; } my_field_func_data; static inline std::complex my_field_func(const std::complex *fields, const meep::vec &loc, void *data_) { my_field_func_data *data = (my_field_func_data *) data_; int num_items = data->nf; cnumber *items = new cnumber[num_items]; for (int i = 0; i < num_items; ++i) items[i] = make_cnumber(real(fields[i]), imag(fields[i])); SCM ret = scm_apply_0(data->func, scm_cons(ctl_convert_vector3_to_scm(vec_to_vector3(loc)), make_cnumber_list(num_items, items))); delete[] items; cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func3_scm; static inline std::complex my_complex_func3(std::complex x) { cnumber cx; cx.re = real(x); cx.im = imag(x); SCM ret = gh_call1(my_complex_func3_scm, ctl_convert_cnumber_to_scm(cx)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } %} %typecheck(SWIG_TYPECHECK_COMPLEX) std::complex { $1 = SwigComplex_Check($input); } %typemap(guile,out) complex, std::complex, std::complex { $result = scm_make_rectangular(ctl_convert_number_to_scm($1.real()), ctl_convert_number_to_scm($1.imag())); } %typemap(guile,in) complex, std::complex, std::complex { cnumber cnum = ctl_convert_cnumber_to_c($input); $1 = std::complex(cnum.re, cnum.im); } %typemap(guile,in) std::complex(*)(meep::vec const &) { my_complex_func_scm = $input; $1 = my_complex_func; } %typecheck(SWIG_TYPECHECK_POINTER) std::complex(*)(meep::vec const &) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) std::complex(*)(std::complex) { my_complex_func3_scm = $input; $1 = my_complex_func3; } %typecheck(SWIG_TYPECHECK_POINTER) std::complex(*)(std::complex) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) (std::complex (*func)(double t, void *), void *data) { $1 = my_complex_func2; $2 = (void *) $input; // input is SCM pointer to Scheme function } %typecheck(SWIG_TYPECHECK_POINTER) (std::complex (*func)(double t, void *), void *data) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) meep::vec { $1 = vector3_to_vec(ctl_convert_vector3_to_c($input)); } %typemap(guile,out) meep::vec { $result = ctl_convert_vector3_to_scm(vec_to_vector3($1)); } %typemap(guile,in) meep::vec const & %{ meep::vec vec__$1 = vector3_to_vec(ctl_convert_vector3_to_c($input)); $1 = &vec__$1; %} %typecheck(SWIG_TYPECHECK_COMPLEX) meep::vec, meep::vec const & { $1 = SwigVector3_Check($input); } /* field_function arguments are passed as a cons pair of (components . func) in order to set all four arguments at once. */ %typemap(guile,in) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) (my_field_func_data data) { $1 = list_length(gh_car($input)); $2 = new meep::component[$1]; for (int i = 0; i < $1; ++i) $2[i] = meep::component(integer_list_ref(gh_car($input), i)); data.nf = $1; data.func = gh_cdr($input); $3 = my_field_func; $4 = &data; } %typemap(freearg) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) { if ($2) delete[] $2; } %typecheck(SWIG_TYPECHECK_POINTER) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) { $1 = SCM_NFALSEP(scm_pair_p($input)) && SCM_NFALSEP(scm_list_p(gh_car($input))) && SCM_NFALSEP(scm_procedure_p(gh_cdr($input))); } /* integrate2 arguments are passed as a cons pair of ((components1 . components2) . func) in order to set all six arguments at once. */ %typemap(guile,in) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { $1 = list_length(gh_car(gh_car($input))); $2 = new meep::component[$1]; for (int i = 0; i < $1; ++i) $2[i] = meep::component(integer_list_ref(gh_car(gh_car($input)), i)); $3 = list_length(gh_cdr(gh_car($input))); $4 = new meep::component[$3]; for (int i = 0; i < $3; ++i) $4[i] = meep::component(integer_list_ref(gh_cdr(gh_car($input)), i)); data.nf = $1 + $3; data.func = gh_cdr($input); $5 = my_field_func; $6 = &data; } %typemap(freearg) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { if ($2) delete[] $2; if ($4) delete[] $4; } %typecheck(SWIG_TYPECHECK_POINTER) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { $1 = SCM_NFALSEP(scm_pair_p($input)) && SCM_NFALSEP(scm_pair_p(gh_car($input))) && SCM_NFALSEP(scm_list_p(gh_car(gh_car($input)))) && SCM_NFALSEP(scm_list_p(gh_cdr(gh_car($input)))) && SCM_NFALSEP(scm_procedure_p(gh_cdr($input))); } // Need to tell SWIG about any method that returns a new object // which needs to be garbage-collected. %newobject meep::fields::open_h5file; %newobject *::clone; %newobject meep::dft_flux::flux; %include "meep_renames.i" %include "meep_enum_renames.i" %include "meep_op_renames.i" %include "meep_swig_bug_workaround.i" %include "meep/vec.hpp" %include "meep/mympi.hpp" %include "meep.hpp" %include "ctl-io.i" %{ #include "meep-ctl-swig.hpp" %} %include "meep-ctl-swig.hpp" meep-1.3/libctl/meep_swig_bug_workaround.i0000644000175400001440000000052312506540665015747 00000000000000// AUTOMATICALLY GENERATED -- DO NOT EDIT %ignore identity; %ignore iveccyl; %ignore mirror; %ignore one_ivec; %ignore one_vec; %ignore rotate2; %ignore rotate4; %ignore r_to_minus_r_symmetry; %ignore veccyl; %ignore vol1d; %ignore vol2d; %ignore vol3d; %ignore volcyl; %ignore volone; %ignore voltwo; %ignore zero_ivec; %ignore zero_vec; meep-1.3/libctl/meep_wrap.patch0000644000175400001440000000026012315330373013473 00000000000000751c751,755 < typedef SCM (*swig_guile_proc)(); --- > #if SCM_MAJOR_VERSION >= 2 > typedef scm_t_subr swig_guile_proc; > #else > typedef SCM (*swig_guile_proc)(); > #endif meep-1.3/libctl/Makefile.in0000644000175400001440000007001112506540651012545 00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = meep@MEEP_SUFFIX@$(EXEEXT) subdir = libctl DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/meep.scm.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = meep.scm CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = am_meep@MEEP_SUFFIX@_OBJECTS = meep.$(OBJEXT) structure.$(OBJEXT) \ meep_wrap.$(OBJEXT) $(am__objects_1) nodist_meep@MEEP_SUFFIX@_OBJECTS = main.$(OBJEXT) geom.$(OBJEXT) \ ctl-io.$(OBJEXT) meep@MEEP_SUFFIX@_OBJECTS = $(am_meep@MEEP_SUFFIX@_OBJECTS) \ $(nodist_meep@MEEP_SUFFIX@_OBJECTS) meep@MEEP_SUFFIX@_DEPENDENCIES = $(LIBMEEP) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(meep@MEEP_SUFFIX@_SOURCES) \ $(nodist_meep@MEEP_SUFFIX@_SOURCES) DIST_SOURCES = $(meep@MEEP_SUFFIX@_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(nodist_pkgdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ # gen-ctl-io program GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ # libctl install. dir., e.g. /usr/local/share/libctl LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MPIRUN = @MPIRUN@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = meep.scm.in meep-enums.scm casimir.scm meep_wrap.patch LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la HDRS = meep-ctl.hpp meep-ctl-const.hpp meep-ctl-swig.hpp LIBHDRS = $(top_srcdir)/src/meep.hpp $(top_srcdir)/src/meep/vec.hpp $(top_srcdir)/src/meep/mympi.hpp CTLHDRS = $(LIBHDRS) $(srcdir)/meep-ctl.hpp $(top_builddir)/config.h $(srcdir)/meep-ctl-const.hpp ctl-io.h meep@MEEP_SUFFIX@_SOURCES = meep.cpp structure.cpp meep_wrap.cxx $(HDRS) meep.i meep_op_renames.i meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i nodist_meep@MEEP_SUFFIX@_SOURCES = main.cpp geom.cpp ctl-io.cpp ctl-io.h ctl-io.i meep@MEEP_SUFFIX@_LDADD = $(LIBMEEP) @LIBCTL_LIBS@ BUILT_SOURCES = $(nodist_meep_SOURCES) meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i meep-enums.scm meep_wrap.cxx ############################################################################## # stuff below is based on example Makefile.in included with libctl ############################################################################## # what is printed out when invoking your program with --version: VERSION_STRING = "Meep @VERSION@, Copyright (C) 2005-2015 Massachusetts Insitute of Technology." MY_DEFS = -DHAVE_CTL_HOOKS=1 -DHAVE_CTL_EXPORT_HOOK=1 PROGRAM_NAME = meep SPECIFICATION_FILE = $(PROGRAM_NAME).scm nodist_pkgdata_DATA = $(SPECIFICATION_FILE) meep-enums.scm casimir.scm ############################################################################## AM_CPPFLAGS = -I$(top_srcdir)/src $(MY_DEFS) $(CTL_DEFS) $(CTL_H_CPPFLAG) ############################################################################## CTL_DEFS = -DCTL_SCM='"'$(LIBCTL_DIR)/base/ctl.scm'"' \ -DINCLUDE_SCM='"'$(LIBCTL_DIR)/base/include.scm'"' \ -DSPEC_SCM='"'$(pkgdatadir)/$(SPECIFICATION_FILE)'"' \ -DVERSION_STRING='"'$(VERSION_STRING)'"' all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libctl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libctl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): meep.scm: $(top_builddir)/config.status $(srcdir)/meep.scm.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list meep@MEEP_SUFFIX@$(EXEEXT): $(meep@MEEP_SUFFIX@_OBJECTS) $(meep@MEEP_SUFFIX@_DEPENDENCIES) $(EXTRA_meep@MEEP_SUFFIX@_DEPENDENCIES) @rm -f meep@MEEP_SUFFIX@$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(meep@MEEP_SUFFIX@_OBJECTS) $(meep@MEEP_SUFFIX@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctl-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meep_wrap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structure.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA) @$(NORMAL_INSTALL) @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-nodist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-nodist_pkgdataDATA .MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-local cscopelist-am ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nodist_pkgdataDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-nodist_pkgdataDATA # manual dependency hack to force the build order in certain cases # ... for some reason automake's automatic dependencies are not working here meep.o: meep.cpp meep-enums.scm $(CTLHDRS) structure.o: structure.cpp $(CTLHDRS) meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS) @MAINTAINER_MODE_TRUE@@WITH_LIBCTL_TRUE@meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS) @MAINTAINER_MODE_TRUE@@WITH_LIBCTL_TRUE@ swig -I$(top_srcdir)/src -c++ -guile -o $@ meep.i @MAINTAINER_MODE_TRUE@@WITH_LIBCTL_TRUE@ patch -p0 $@ < $(srcdir)/meep_wrap.patch @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@meep_wrap.cxx: @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@ echo "#error need --with-maintainer-mode to generate this file" 1>&2 @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@ exit 1 @WITH_LIBCTL_FALSE@meep_wrap.cxx: @WITH_LIBCTL_FALSE@ echo "#error need --with-libctl to generate this file" > $@ # workaround missing namespace prefix in swig meep_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; sed 's/^ *class \+\([A-Za-z_0-9:]*\)\( *\| *:[^{]*\){.*$$/%rename(meep_\1) meep::\1;/' $(LIBHDRS) | grep "%rename" | sort -u; echo; grep -hv typedef $(LIBHDRS) | sed 's/\(inline\|const\|extern\|static\) \+//g' | sed 's/^[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%rename(meep_\1) meep::\1;/' | grep "%rename" | sort -u; ) > $@ # work around bug in swig, where it doesn't prepend namespace to friend funcs meep_swig_bug_workaround.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; grep -h friend $(LIBHDRS) | sed 's/^ *friend \+[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%ignore \1;/' | grep "%ignore" | sort -u;) > $@ meep_enum_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; for f in $(LIBHDRS); do egrep "^enum" $$f | sed 's/enum \+\([A-Za-z_0-9:]\+\).*$$/\1/g' | while read enum; do cat $$f | tr -d '\n' | sed 's/.*enum \+'$${enum}' *{\([^}]*\)}.*/\1/g' | sed 's/= *[0-9]\+//g' |tr -d ' \t' | tr ',' '\n' | sed 's/^.*$$/'"%rename(meep_$${enum}_\0) meep::\0;/g"; echo; done; done;) > $@ meep-enums.scm: meep_enum_renames.i (sed 's/%rename(\([A-Za-z0-9_]*\)) *\([A-Za-z0-9:_]*\);$$/(define \2 (\1))/' meep_enum_renames.i | sed 's/[A-Za-z0-9:_]*:://g' | sed 's/_/-/g' | sed 's,//,;,'; echo "(define Centered Dielectric)") > $@ ############################################################################## ctl-io.cpp: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm ctl-io.h $(GEN_CTL_IO) --cxx --code -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.h: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --header -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.i: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --swig -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) main.cpp: $(LIBCTL_DIR)/base/main.c ctl-io.h cp -f $(LIBCTL_DIR)/base/main.c $@ geom.cpp: $(LIBCTL_DIR)/utils/geom.c ctl-io.h cp -f $(LIBCTL_DIR)/utils/geom.c $@ clean-local: rm -f $(nodist_meep_SOURCES) meep-enums.scm ctl-io.* main.* geom.* maintainer-clean-local: rm -f $(BUILT_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-1.3/libctl/meep_enum_renames.i0000644000175400001440000000611012506540665014342 00000000000000// AUTOMATICALLY GENERATED -- DO NOT EDIT %rename(meep_in_or_out_Incoming) meep::Incoming; %rename(meep_in_or_out_Outgoing) meep::Outgoing; %rename(meep_connect_phase_CONNECT_PHASE) meep::CONNECT_PHASE; %rename(meep_connect_phase_CONNECT_NEGATE) meep::CONNECT_NEGATE; %rename(meep_connect_phase_CONNECT_COPY) meep::CONNECT_COPY; %rename(meep_boundary_condition_Periodic) meep::Periodic; %rename(meep_boundary_condition_Metallic) meep::Metallic; %rename(meep_boundary_condition_Magnetic) meep::Magnetic; %rename(meep_boundary_condition_None) meep::None; %rename(meep_time_sink_Connecting) meep::Connecting; %rename(meep_time_sink_Stepping) meep::Stepping; %rename(meep_time_sink_Boundaries) meep::Boundaries; %rename(meep_time_sink_MpiTime) meep::MpiTime; %rename(meep_time_sink_FieldOutput) meep::FieldOutput; %rename(meep_time_sink_FourierTransforming) meep::FourierTransforming; %rename(meep_time_sink_Other) meep::Other; %rename(meep_grace_type_XY) meep::XY; %rename(meep_grace_type_ERROR_BARS) meep::ERROR_BARS; %rename(meep_component_Ex) meep::Ex; %rename(meep_component_Ey) meep::Ey; %rename(meep_component_Er) meep::Er; %rename(meep_component_Ep) meep::Ep; %rename(meep_component_Ez) meep::Ez; %rename(meep_component_Hx) meep::Hx; %rename(meep_component_Hy) meep::Hy; %rename(meep_component_Hr) meep::Hr; %rename(meep_component_Hp) meep::Hp; %rename(meep_component_Hz) meep::Hz; %rename(meep_component_Dx) meep::Dx; %rename(meep_component_Dy) meep::Dy; %rename(meep_component_Dr) meep::Dr; %rename(meep_component_Dp) meep::Dp; %rename(meep_component_Dz) meep::Dz; %rename(meep_component_Bx) meep::Bx; %rename(meep_component_By) meep::By; %rename(meep_component_Br) meep::Br; %rename(meep_component_Bp) meep::Bp; %rename(meep_component_Bz) meep::Bz; %rename(meep_component_Dielectric) meep::Dielectric; %rename(meep_component_Permeability) meep::Permeability; %rename(meep_derived_component_Sx) meep::Sx; %rename(meep_derived_component_Sy) meep::Sy; %rename(meep_derived_component_Sr) meep::Sr; %rename(meep_derived_component_Sp) meep::Sp; %rename(meep_derived_component_Sz) meep::Sz; %rename(meep_derived_component_EnergyDensity) meep::EnergyDensity; %rename(meep_derived_component_D_EnergyDensity) meep::D_EnergyDensity; %rename(meep_derived_component_H_EnergyDensity) meep::H_EnergyDensity; %rename(meep_ndim_D1) meep::D1; %rename(meep_ndim_D2) meep::D2; %rename(meep_ndim_D3) meep::D3; %rename(meep_ndim_Dcyl) meep::Dcyl; %rename(meep_field_type_E_stuff) meep::E_stuff; %rename(meep_field_type_H_stuff) meep::H_stuff; %rename(meep_field_type_D_stuff) meep::D_stuff; %rename(meep_field_type_B_stuff) meep::B_stuff; %rename(meep_field_type_PE_stuff) meep::PE_stuff; %rename(meep_field_type_PH_stuff) meep::PH_stuff; %rename(meep_field_type_WE_stuff) meep::WE_stuff; %rename(meep_field_type_WH_stuff) meep::WH_stuff; %rename(meep_boundary_side_High) meep::High; %rename(meep_boundary_side_Low) meep::Low; %rename(meep_direction_X) meep::X; %rename(meep_direction_Y) meep::Y; %rename(meep_direction_Z) meep::Z; %rename(meep_direction_R) meep::R; %rename(meep_direction_P) meep::P; %rename(meep_direction_NO_DIRECTION) meep::NO_DIRECTION; meep-1.3/libctl/meep-ctl-const.hpp0000644000175400001440000000034712315330161014037 00000000000000// -*- C++ -*- /* Meep constants which must be the same in C and Scheme */ #define CYLINDRICAL -2 /* should be the same as meep::direction enum */ #define X_DIR 0 #define Y_DIR 1 #define Z_DIR 2 #define R_DIR 4 #define PHI_DIR 5 meep-1.3/libctl/meep.cpp0000644000175400001440000001021712506314611012127 00000000000000#include "meep-ctl.hpp" using namespace meep; using namespace std; /**************************************************************************/ /* The following are hook functions called from main() when starting the program and just before exiting. */ static initialize *meep_init = 0; void ctl_start_hook(int *argc, char ***argv) { meep_init = new initialize(*argc, *argv); #ifdef HAVE_LIBCTL_QUIET extern int libctl_quiet; libctl_quiet = !am_master(); #endif } void ctl_stop_hook(void) { delete meep_init; } extern "C" void SWIG_init(); void ctl_export_hook(void) { SWIG_init(); } /**************************************************************************/ ctlio::cvector3_list do_harminv(ctlio::cnumber_list vals, double dt, double fmin, double fmax, int maxbands) { complex *amp = new complex[maxbands]; double *freq_re = new double[maxbands]; double *freq_im = new double[maxbands]; double *freq_err = new double[maxbands]; maxbands = do_harminv(reinterpret_cast*>(vals.items), vals.num_items, dt, fmin, fmax, maxbands, amp, freq_re, freq_im, freq_err); ctlio::cvector3_list res; res.num_items = maxbands; res.items = new cvector3[maxbands]; for (int i = 0; i < maxbands; ++i) { res.items[i].x.re = freq_re[i]; res.items[i].x.im = freq_im[i]; res.items[i].y.re = real(amp[i]); res.items[i].y.im = imag(amp[i]); res.items[i].z.re = freq_err[i]; res.items[i].z.im = 0; } delete[] freq_err; delete[] freq_im; delete[] freq_re; delete[] amp; return res; } /**************************************************************************/ /* This is a wrapper function to fool SWIG...since our list constructor takes ownership of the next pointer, we have to make sure that SWIG does not garbage-collect volume_list objects. We do this by wrapping a "helper" function around the constructor which does not have the %newobject SWIG attribute. Note that we then need to deallocate the list explicitly in Scheme. */ volume_list *make_volume_list(const volume &v, int c, complex weight, volume_list *next) { return new volume_list(v, c, weight, next); } /***************************************************************************/ ctlio::number_list dft_flux_flux(dft_flux *f) { ctlio::number_list res; res.num_items = f->Nfreq; res.items = f->flux(); return res; } ctlio::number_list dft_force_force(dft_force *f) { ctlio::number_list res; res.num_items = f->Nfreq; res.items = f->force(); return res; } ctlio::number_list dft_ldos_ldos(dft_ldos *f) { ctlio::number_list res; res.num_items = f->Nomega; res.items = f->ldos(); return res; } ctlio::cnumber_list dft_ldos_F(dft_ldos *f) { ctlio::cnumber_list res; res.num_items = f->Nomega; res.items = (cnumber *) f->F(); return res; } ctlio::cnumber_list dft_ldos_J(dft_ldos *f) { ctlio::cnumber_list res; res.num_items = f->Nomega; res.items = (cnumber *) f->J(); return res; } ctlio::cnumber_list dft_near2far_farfield(dft_near2far *f, const vec &x) { ctlio::cnumber_list res; res.num_items = f->Nfreq * 6; res.items = (cnumber *) f->farfield(x); return res; } /***************************************************************************/ ctlio::cnumber_list make_casimir_g(double T, double dt, double sigma, meep::field_type ft, complex (*eps_func)(complex omega), double Tfft) { ctlio::cnumber_list res; res.num_items = int(ceil(T / dt)); res.items = new cnumber[res.num_items]; complex *g = meep::make_casimir_gfunc(T, dt, sigma, ft, eps_func, Tfft); for (int i = 0; i < res.num_items; ++i) { res.items[i].re = real(g[i]); res.items[i].im = imag(g[i]); } delete[] g; return res; } ctlio::cnumber_list make_casimir_g_kz(double T, double dt, double sigma, meep::field_type ft) { ctlio::cnumber_list res; res.num_items = int(ceil(T / dt)); res.items = new cnumber[res.num_items]; complex *g = meep::make_casimir_gfunc_kz(T, dt, sigma, ft); for (int i = 0; i < res.num_items; ++i) { res.items[i].re = real(g[i]); res.items[i].im = imag(g[i]); } delete[] g; return res; } meep-1.3/libctl/meep-ctl.hpp0000644000175400001440000000057512315330161012716 00000000000000// -*- C++ -*- #ifndef MEEP_CTL_H #define MEEP_CTL_H #include "meep.hpp" #include "meep-ctl-const.hpp" #include "config.h" #include "ctl-io.h" #include "meep-ctl-swig.hpp" extern int verbose; // in main.c /***************************************************************************/ #define CK(ex, msg) \ (void)((ex) || (meep::abort(msg), 0)) #endif /* MEEP_CTL_H */ meep-1.3/libctl/structure.cpp0000644000175400001440000015611312323015367013252 00000000000000#include "meep-ctl.hpp" #include #include using namespace ctlio; #define master_printf meep::master_printf #define MTS material_type_struct typedef struct { double m00, m01, m02, m11, m12, m22; } symmetric_matrix; /* rotate A by a unitary (real) rotation matrix R: RAR = transpose(R) * A * R */ void sym_matrix_rotate(symmetric_matrix *RAR, const symmetric_matrix *A_, const double R[3][3]) { int i,j; double A[3][3], AR[3][3]; A[0][0] = A_->m00; A[1][1] = A_->m11; A[2][2] = A_->m22; A[0][1] = A[1][0] = A_->m01; A[0][2] = A[2][0] = A_->m02; A[1][2] = A[2][1] = A_->m12; for (i = 0; i < 3; ++i) for (j = 0; j < 3; ++j) AR[i][j] = A[i][0]*R[0][j] + A[i][1]*R[1][j] + A[i][2]*R[2][j]; for (i = 0; i < 3; ++i) for (j = i; j < 3; ++j) A[i][j] = R[0][i]*AR[0][j] + R[1][i]*AR[1][j] + R[2][i]*AR[2][j]; RAR->m00 = A[0][0]; RAR->m11 = A[1][1]; RAR->m22 = A[2][2]; RAR->m01 = A[0][1]; RAR->m02 = A[0][2]; RAR->m12 = A[1][2]; } /* Set Vinv = inverse of V, where both V and Vinv are real-symmetric matrices.*/ void sym_matrix_invert(symmetric_matrix *Vinv, const symmetric_matrix *V) { double m00 = V->m00, m11 = V->m11, m22 = V->m22; double m01 = V->m01, m02 = V->m02, m12 = V->m12; if (m01 == 0.0 && m02 == 0.0 && m12 == 0.0) { /* optimize common case of a diagonal matrix: */ Vinv->m00 = 1.0 / m00; Vinv->m11 = 1.0 / m11; Vinv->m22 = 1.0 / m22; Vinv->m01 = Vinv->m02 = Vinv->m12 = 0.0; } else { double detinv; /* compute the determinant: */ detinv = m00*m11*m22 - m02*m11*m02 + 2.0 * m01*m12*m02 - m01*m01*m22 - m12*m12*m00; if (detinv == 0.0) meep::abort( "singular 3x3 matrix"); detinv = 1.0/detinv; Vinv->m00 = detinv * (m11*m22 - m12*m12); Vinv->m11 = detinv * (m00*m22 - m02*m02); Vinv->m22 = detinv * (m11*m00 - m01*m01); Vinv->m02 = detinv * (m01*m12 - m11*m02); Vinv->m01 = detinv * (m12*m02 - m01*m22); Vinv->m12 = detinv * (m01*m02 - m00*m12); } } /* Returns whether or not V is positive-definite. */ int sym_matrix_positive_definite(symmetric_matrix *V) { double det2, det3; double m00 = V->m00, m11 = V->m11, m22 = V->m22; #if defined(WITH_HERMITIAN_EPSILON) scalar_complex m01 = V->m01, m02 = V->m02, m12 = V->m12; det2 = m00*m11 - CSCALAR_NORMSQR(m01); det3 = det2*m22 - m11*CSCALAR_NORMSQR(m02) - CSCALAR_NORMSQR(m12)*m00 + 2.0 * ((m01.re * m12.re - m01.im * m12.im) * m02.re + (m01.re * m12.im + m01.im * m12.re) * m02.im); #else /* real matrix */ double m01 = V->m01, m02 = V->m02, m12 = V->m12; det2 = m00*m11 - m01*m01; det3 = det2*m22 - m02*m11*m02 + 2.0 * m01*m12*m02 - m12*m12*m00; #endif /* real matrix */ return (m00 > 0.0 && det2 > 0.0 && det3 > 0.0); } static meep::ndim dim = meep::D3; /***********************************************************************/ void set_dimensions(int dims) { if (dims == CYLINDRICAL) { dimensions = 2; dim = meep::Dcyl; } else { dimensions = dims; dim = meep::ndim(dims - 1); } } vector3 vec_to_vector3(const meep::vec &pt) { vector3 v3; switch (pt.dim) { case meep::D1: v3.x = 0; v3.y = 0; v3.z = pt.z(); break; case meep::D2: v3.x = pt.x(); v3.y = pt.y(); v3.z = 0; break; case meep::D3: v3.x = pt.x(); v3.y = pt.y(); v3.z = pt.z(); break; case meep::Dcyl: v3.x = pt.r(); v3.y = 0; v3.z = pt.z(); break; } return v3; } meep::vec vector3_to_vec(const vector3 v3) { switch (dim) { case meep::D1: return meep::vec(v3.z); case meep::D2: return meep::vec(v3.x, v3.y); case meep::D3: return meep::vec(v3.x, v3.y, v3.z); case meep::Dcyl: return meep::veccyl(v3.x, v3.z); default: meep::abort("unknown dimensionality in vector3_to_vec"); } } static meep::vec geometry_edge; // geometry_lattice.size / 2 static geom_box gv2box(const meep::volume &v) { geom_box box; box.low = vec_to_vector3(v.get_min_corner()); box.high = vec_to_vector3(v.get_max_corner()); return box; } /***********************************************************************/ static meep::realnum *epsilon_data = NULL; static int epsilon_dims[3] = {0,0,0}; static void read_epsilon_file(const char *eps_input_file) { delete[] epsilon_data; epsilon_data = NULL; epsilon_dims[0] = epsilon_dims[1] = epsilon_dims[2] = 1; if (eps_input_file && eps_input_file[0]) { // file specified char *fname = new char[strlen(eps_input_file)+1]; strcpy(fname, eps_input_file); // parse epsilon-input-file as "fname.h5:dataname" char *dataname = strrchr(fname, ':'); if (dataname) *(dataname++) = 0; meep::h5file eps_file(fname, meep::h5file::READONLY, false); int rank; // ignored since rank < 3 is equivalent to singleton dims epsilon_data = eps_file.read(dataname, &rank, epsilon_dims, 3); master_printf("read in %dx%dx%d epsilon-input-file \"%s\"\n", epsilon_dims[0], epsilon_dims[1], epsilon_dims[2], eps_input_file); } } /* Linearly interpolate a given point in a 3d grid of data. The point coordinates should be in the range [0,1], or at the very least [-1,2] ... anything outside [0,1] is *mirror* reflected into [0,1] */ static meep::realnum linear_interpolate( meep::realnum rx, meep::realnum ry, meep::realnum rz, meep::realnum *data, int nx, int ny, int nz, int stride) { int x, y, z, x2, y2, z2; meep::realnum dx, dy, dz; /* mirror boundary conditions for r just beyond the boundary */ if (rx < 0.0) rx = -rx; else if (rx > 1.0) rx = 1.0 - rx; if (ry < 0.0) ry = -ry; else if (ry > 1.0) ry = 1.0 - ry; if (rz < 0.0) rz = -rz; else if (rz > 1.0) rz = 1.0 - rz; /* get the point corresponding to r in the epsilon array grid: */ x = rx * nx; if (x == nx) --x; y = ry * ny; if (y == ny) --y; z = rz * nz; if (z == nz) --z; /* get the difference between (x,y,z) and the actual point ... we shift by 0.5 to center the data points in the pixels */ dx = rx * nx - x - 0.5; dy = ry * ny - y - 0.5; dz = rz * nz - z - 0.5; /* get the other closest point in the grid, with mirror boundaries: */ x2 = (dx >= 0.0 ? x + 1 : x - 1); if (x2 < 0) x2++; else if (x2 == nx) x2--; y2 = (dy >= 0.0 ? y + 1 : y - 1); if (y2 < 0) y2++; else if (y2 == ny) y2--; z2 = (dz >= 0.0 ? z + 1 : z - 1); if (z2 < 0) z2++; else if (z2 == nz) z2--; /* take abs(d{xyz}) to get weights for {xyz} and {xyz}2: */ dx = fabs(dx); dy = fabs(dy); dz = fabs(dz); /* define a macro to give us data(x,y,z) on the grid, in row-major order (the order used by HDF5): */ #define D(x,y,z) (data[(((x)*ny + (y))*nz + (z)) * stride]) return(((D(x,y,z)*(1.0-dx) + D(x2,y,z)*dx) * (1.0-dy) + (D(x,y2,z)*(1.0-dx) + D(x2,y2,z)*dx) * dy) * (1.0-dz) + ((D(x,y,z2)*(1.0-dx) + D(x2,y,z2)*dx) * (1.0-dy) + (D(x,y2,z2)*(1.0-dx) + D(x2,y2,z2)*dx) * dy) * dz); #undef D } // return material of the point p from the file (assumed already read) static void epsilon_file_material(material_type &m, vector3 p) { material_type_copy(&default_material, &m); if (!epsilon_data) return; if (m.which_subclass != MTS::MEDIUM) meep::abort("epsilon-input-file only works with a type=medium default-material"); medium *mm = m.subclass.medium_data; double rx = geometry_lattice.size.x == 0 ? 0 : 0.5 + (p.x-geometry_center.x) / geometry_lattice.size.x; double ry = geometry_lattice.size.y == 0 ? 0 : 0.5 + (p.y-geometry_center.y) / geometry_lattice.size.y; double rz = geometry_lattice.size.z == 0 ? 0 : 0.5 + (p.z-geometry_center.z) / geometry_lattice.size.z; mm->epsilon_diag.x = mm->epsilon_diag.y = mm->epsilon_diag.z = linear_interpolate(rx, ry, rz, epsilon_data, epsilon_dims[0], epsilon_dims[1], epsilon_dims[2], 1); mm->epsilon_offdiag.x = mm->epsilon_offdiag.y = mm->epsilon_offdiag.z = 0; } /***********************************************************************/ struct pol { susceptibility user_s; struct pol *next; }; // structure to hold a conductivity profile (for scalar absorbing layers) struct cond_profile { double L; // thickness int N; // number of points prof[n] from 0..N corresponding to 0..L double *prof; // (NULL if none) }; class geom_epsilon : public meep::material_function { geometric_object_list geometry; geom_box_tree geometry_tree; geom_box_tree restricted_tree; cond_profile cond[5][2]; // [direction][side] public: geom_epsilon(geometric_object_list g, material_type_list mlist, const meep::volume &v); virtual ~geom_epsilon(); virtual void set_cond_profile(meep::direction, meep::boundary_side, double L, double dx, double (*prof)(int,double*,void*), void*, double R); virtual void set_volume(const meep::volume &v); virtual void unset_volume(void); virtual bool has_chi3(meep::component c); virtual double chi3(meep::component c, const meep::vec &r); virtual bool has_chi2(meep::component c); virtual double chi2(meep::component c, const meep::vec &r); virtual bool has_mu(); virtual bool has_conductivity(meep::component c); virtual double conductivity(meep::component c, const meep::vec &r); virtual double chi1p1(meep::field_type ft, const meep::vec &r); virtual void eff_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval); void fallback_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval); virtual void sigma_row(meep::component c, double sigrow[3], const meep::vec &r); void add_susceptibilities(meep::structure *s); void add_susceptibilities(meep::field_type ft, meep::structure *s); private: bool get_material_pt(material_type &material, const meep::vec &r); material_type_list extra_materials; pol *current_pol; }; geom_epsilon::geom_epsilon(geometric_object_list g, material_type_list mlist, const meep::volume &v) { geometry = g; // don't bother making a copy, only used in one place extra_materials = mlist; current_pol = NULL; FOR_DIRECTIONS(d) FOR_SIDES(b) cond[d][b].prof = NULL; if (meep::am_master()) { for (int i = 0; i < geometry.num_items; ++i) { display_geometric_object_info(5, geometry.items[i]); if (geometry.items[i].material.which_subclass == MTS::MEDIUM) printf("%*sdielectric constant epsilon diagonal = (%g,%g,%g)\n", 5 + 5, "", geometry.items[i].material. subclass.medium_data->epsilon_diag.x, geometry.items[i].material. subclass.medium_data->epsilon_diag.y, geometry.items[i].material. subclass.medium_data->epsilon_diag.z); } } geom_fix_objects0(geometry); geom_box box = gv2box(v); geometry_tree = create_geom_box_tree0(geometry, box); if (verbose && meep::am_master()) { printf("Geometric-object bounding-box tree:\n"); display_geom_box_tree(5, geometry_tree); int tree_depth, tree_nobjects; geom_box_tree_stats(geometry_tree, &tree_depth, &tree_nobjects); master_printf("Geometric object tree has depth %d " "and %d object nodes (vs. %d actual objects)\n", tree_depth, tree_nobjects, geometry.num_items); } restricted_tree = geometry_tree; } geom_epsilon::~geom_epsilon() { unset_volume(); destroy_geom_box_tree(geometry_tree); FOR_DIRECTIONS(d) FOR_SIDES(b) if (cond[d][b].prof) delete[] cond[d][b].prof; } void geom_epsilon::set_cond_profile(meep::direction dir, meep::boundary_side side, double L, double dx, double (*P)(int,double*,void*), void *data, double R) { if (cond[dir][side].prof) delete[] cond[dir][side].prof; int N = int(L / dx + 0.5); cond[dir][side].L = L; cond[dir][side].N = N; double *prof = cond[dir][side].prof = new double[N+1]; double umin = 0, umax = 1, esterr; int errflag; double prof_int = adaptive_integration(P, &umin,&umax, 1, data, 1e-9, 1e-4, 50000, &esterr, &errflag); double prefac = (-log(R)) / (4*L*prof_int); for (int i = 0; i <= N; ++i) { double u = double(i)/N; prof[i] = prefac * P(1, &u, data); } } void geom_epsilon::unset_volume(void) { if (restricted_tree != geometry_tree) { destroy_geom_box_tree(restricted_tree); restricted_tree = geometry_tree; } } void geom_epsilon::set_volume(const meep::volume &v) { unset_volume(); geom_box box = gv2box(v); restricted_tree = create_geom_box_tree0(geometry, box); } static material_type eval_material_func(function material_func, vector3 p) { SCM pscm = ctl_convert_vector3_to_scm(p); material_type material; SCM mo; mo = gh_call1(material_func, pscm); material_type_input(mo, &material); while (material.which_subclass == MTS::MATERIAL_FUNCTION) { material_type m; mo = gh_call1(material.subclass. material_function_data->material_func, pscm); material_type_input(mo, &m); material_type_destroy(material); material = m; } if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { epsilon_file_material(material, p); } CK(material.which_subclass != MTS::MATERIAL_FUNCTION, "infinite loop in material functions"); return material; } static int variable_material(int which_subclass) { return (which_subclass == MTS::MATERIAL_FUNCTION); } static bool is_metal(meep::field_type ft, const material_type *material) { if (ft == meep::E_stuff) switch (material->which_subclass) { case MTS::MEDIUM: return (material->subclass.medium_data->epsilon_diag.x < 0 || material->subclass.medium_data->epsilon_diag.y < 0 || material->subclass.medium_data->epsilon_diag.z < 0); case MTS::PERFECT_METAL: return true; default: meep::abort("unknown material type"); } else switch (material->which_subclass) { case MTS::MEDIUM: return (material->subclass.medium_data->mu_diag.x < 0 || material->subclass.medium_data->mu_diag.y < 0 || material->subclass.medium_data->mu_diag.z < 0); case MTS::PERFECT_METAL: return false; // is an electric conductor, but not a magnetic conductor default: meep::abort("unknown material type"); } } static void material_epsmu(meep::field_type ft, material_type material, symmetric_matrix *epsmu, symmetric_matrix *epsmu_inv) { if (ft == meep::E_stuff) switch (material.which_subclass) { case MTS::MEDIUM: { epsmu->m00 = material.subclass.medium_data->epsilon_diag.x; epsmu->m11 = material.subclass.medium_data->epsilon_diag.y; epsmu->m22 = material.subclass.medium_data->epsilon_diag.z; epsmu->m01 = material.subclass.medium_data->epsilon_offdiag.x; epsmu->m02 = material.subclass.medium_data->epsilon_offdiag.y; epsmu->m12 = material.subclass.medium_data->epsilon_offdiag.z; sym_matrix_invert(epsmu_inv,epsmu); break; } case MTS::PERFECT_METAL: { epsmu->m00 = -meep::infinity; epsmu->m11 = -meep::infinity; epsmu->m22 = -meep::infinity; epsmu_inv->m00 = -0.0; epsmu_inv->m11 = -0.0; epsmu_inv->m22 = -0.0; epsmu->m01 = epsmu->m02 = epsmu->m12 = 0.0; epsmu_inv->m01 = epsmu_inv->m02 = epsmu_inv->m12 = 0.0; break; } default: meep::abort("unknown material type"); } else switch (material.which_subclass) { case MTS::MEDIUM: { epsmu->m00 = material.subclass.medium_data->mu_diag.x; epsmu->m11 = material.subclass.medium_data->mu_diag.y; epsmu->m22 = material.subclass.medium_data->mu_diag.z; epsmu->m01 = material.subclass.medium_data->mu_offdiag.x; epsmu->m02 = material.subclass.medium_data->mu_offdiag.y; epsmu->m12 = material.subclass.medium_data->mu_offdiag.z; sym_matrix_invert(epsmu_inv,epsmu); break; } case MTS::PERFECT_METAL: { epsmu->m00 = 1.0; epsmu->m11 = 1.0; epsmu->m22 = 1.0; epsmu_inv->m00 = 1.0; epsmu_inv->m11 = 1.0; epsmu_inv->m22 = 1.0; epsmu->m01 = epsmu->m02 = epsmu->m12 = 0.0; epsmu_inv->m01 = epsmu_inv->m02 = epsmu_inv->m12 = 0.0; break; } default: meep::abort("unknown material type"); } } bool geom_epsilon::get_material_pt(material_type &material, const meep::vec &r) { vector3 p = vec_to_vector3(r); boolean inobject; material = material_of_unshifted_point_in_tree_inobject(p, restricted_tree,&inobject); bool destroy_material = false; if (!inobject && epsilon_data) { epsilon_file_material(material, p); destroy_material = true; } else if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { if (epsilon_data) { epsilon_file_material(material, p); destroy_material = true; } else material = default_material; } else if (material.which_subclass == MTS::MATERIAL_FUNCTION) { material = eval_material_func(material.subclass. material_function_data->material_func, p); destroy_material = true; } return destroy_material; } // returns trace of the tensor diagonal double geom_epsilon::chi1p1(meep::field_type ft, const meep::vec &r) { symmetric_matrix chi1p1, chi1p1_inv; #ifdef DEBUG vector3 p = vec_to_vector3(r); if (p.x < restricted_tree->b.low.x || p.y < restricted_tree->b.low.y || p.z < restricted_tree->b.low.z || p.x > restricted_tree->b.high.x || p.y > restricted_tree->b.high.y || p.z > restricted_tree->b.high.z) meep::abort("invalid point (%g,%g,%g)\n", p.x,p.y,p.z); #endif material_type material; bool destroy_material = get_material_pt(material, r); material_epsmu(ft, material, &chi1p1, &chi1p1_inv); if (destroy_material) material_type_destroy(material); return (chi1p1.m00 + chi1p1.m11 + chi1p1.m22)/3; } /* Find frontmost object in v, along with the constant material behind it. Returns false if material behind the object is not constant. Requires moderately horrifying logic to figure things out properly, stolen from MPB. */ static bool get_front_object(const meep::volume &v, geom_box_tree geometry_tree, vector3 &pcenter, const geometric_object **o_front, vector3 &shiftby_front, material_type &mat_front, material_type &mat_behind) { vector3 p; const geometric_object *o1 = 0, *o2 = 0; vector3 shiftby1 = {0,0,0}, shiftby2 = {0,0,0}; geom_box pixel; material_type mat1, mat2; int id1 = -1, id2 = -1; const int num_neighbors[3] = { 3, 5, 9 }; const int neighbors[3][9][3] = { { {0,0,0}, {0,0,-1}, {0,0,1}, {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0} }, { {0,0,0}, {-1,-1,0}, {1,1,0}, {-1,1,0}, {1,-1,0}, {0,0,0},{0,0,0},{0,0,0},{0,0,0} }, { {0,0,0}, {1,1,1},{1,1,-1},{1,-1,1},{1,-1,-1}, {-1,1,1},{-1,1,-1},{-1,-1,1},{-1,-1,-1} } }; pixel = gv2box(v); pcenter = p = vec_to_vector3(v.center()); double d1, d2, d3; d1 = (pixel.high.x - pixel.low.x) * 0.5; d2 = (pixel.high.y - pixel.low.y) * 0.5; d3 = (pixel.high.z - pixel.low.z) * 0.5; for (int i = 0; i < num_neighbors[dimensions - 1]; ++i) { const geometric_object *o; material_type mat; vector3 q, shiftby; int id; q.x = p.x + neighbors[dimensions - 1][i][0] * d1; q.y = p.y + neighbors[dimensions - 1][i][1] * d2; q.z = p.z + neighbors[dimensions - 1][i][2] * d3; o = object_of_point_in_tree(q, geometry_tree, &shiftby, &id); if ((id == id1 && vector3_equal(shiftby, shiftby1)) || (id == id2 && vector3_equal(shiftby, shiftby2))) continue; mat = (o && o->material.which_subclass != MTS::MATERIAL_TYPE_SELF) ? o->material : default_material; if (id1 == -1) { o1 = o; shiftby1 = shiftby; id1 = id; mat1 = mat; } else if (id2 == -1 || ((id >= id1 && id >= id2) && (id1 == id2 || material_type_equal(&mat1,&mat2)))) { o2 = o; shiftby2 = shiftby; id2 = id; mat2 = mat; } else if (!(id1 < id2 && (id1 == id || material_type_equal(&mat1,&mat))) && !(id2 < id1 && (id2 == id || material_type_equal(&mat2,&mat)))) return false; } // CHECK(id1 > -1, "bug in object_of_point_in_tree?"); if (id2 == -1) { /* only one nearby object/material */ id2 = id1; o2 = o1; mat2 = mat1; shiftby2 = shiftby1; } if ((o1 && variable_material(o1->material.which_subclass)) || (o2 && variable_material(o2->material.which_subclass)) || ((variable_material(default_material.which_subclass) || epsilon_data) && (!o1 || !o2 || o1->material.which_subclass == MTS::MATERIAL_TYPE_SELF || o2->material.which_subclass == MTS::MATERIAL_TYPE_SELF))) return false; if (id1 >= id2) { *o_front = o1; shiftby_front = shiftby1; mat_front = mat1; if (id1 == id2) mat_behind = mat1; else mat_behind = mat2; } if (id2 > id1) { *o_front = o2; shiftby_front = shiftby2; mat_front = mat2; mat_behind = mat1; } return true; } void geom_epsilon::eff_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval) { const geometric_object *o; material_type mat, mat_behind; symmetric_matrix meps, meps_inv; vector3 p, shiftby, normal; bool destroy_material = false; if (maxeval == 0 || !get_front_object(v, geometry_tree, p, &o, shiftby, mat, mat_behind)) { noavg: destroy_material = get_material_pt(mat, v.center()); trivial: material_epsmu(meep::type(c), mat, &meps, &meps_inv); switch (component_direction(c)) { case meep::X: case meep::R: chi1inv_row[0] = meps_inv.m00; chi1inv_row[1] = meps_inv.m01; chi1inv_row[2] = meps_inv.m02; break; case meep::Y: case meep::P: chi1inv_row[0] = meps_inv.m01; chi1inv_row[1] = meps_inv.m11; chi1inv_row[2] = meps_inv.m12; break; case meep::Z: chi1inv_row[0] = meps_inv.m02; chi1inv_row[1] = meps_inv.m12; chi1inv_row[2] = meps_inv.m22; break; case meep::NO_DIRECTION: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0; } if (destroy_material) material_type_destroy(mat); return; } // FIXME: reimplement support for fallback integration, without // messing up anisotropic support // if (!get_front_object(v, geometry_tree, // p, &o, shiftby, mat, mat_behind)) { // fallback_chi1inv_row(c, chi1inv_row, v, tol, maxeval); // return; // } /* check for trivial case of only one object/material */ if (material_type_equal(&mat, &mat_behind)) goto trivial; // it doesn't make sense to average metals (electric or magnetic) if (is_metal(meep::type(c), &mat) || is_metal(meep::type(c), &mat_behind)) goto noavg; normal = unit_vector3(normal_to_fixed_object(vector3_minus(p, shiftby), *o)); if (normal.x == 0 && normal.y == 0 && normal.z == 0) goto noavg; // couldn't get normal vector for this point, punt geom_box pixel = gv2box(v); pixel.low = vector3_minus(pixel.low, shiftby); pixel.high = vector3_minus(pixel.high, shiftby); double fill = box_overlap_with_object(pixel, *o, tol, maxeval); material_epsmu(meep::type(c), mat, &meps, &meps_inv); symmetric_matrix eps2, epsinv2; symmetric_matrix eps1, delta; double Rot[3][3]; material_epsmu(meep::type(c), mat_behind, &eps2, &epsinv2); eps1 = meps; Rot[0][0] = normal.x; Rot[1][0] = normal.y; Rot[2][0] = normal.z; if (fabs(normal.x) > 1e-2 || fabs(normal.y) > 1e-2) { Rot[0][2] = normal.y; Rot[1][2] = -normal.x; Rot[2][2] = 0; } else { /* n is not parallel to z direction, use (x x n) instead */ Rot[0][2] = 0; Rot[1][2] = -normal.z; Rot[2][2] = normal.y; } { /* normalize second column */ double s = Rot[0][2]*Rot[0][2]+Rot[1][2]*Rot[1][2]+Rot[2][2]*Rot[2][2]; s = 1.0 / sqrt(s); Rot[0][2] *= s; Rot[1][2] *= s; Rot[2][2] *= s; } /* 1st column is 2nd column x 0th column */ Rot[0][1] = Rot[1][2] * Rot[2][0] - Rot[2][2] * Rot[1][0]; Rot[1][1] = Rot[2][2] * Rot[0][0] - Rot[0][2] * Rot[2][0]; Rot[2][1] = Rot[0][2] * Rot[1][0] - Rot[1][2] * Rot[0][0]; /* rotate epsilon tensors to surface parallel/perpendicular axes */ sym_matrix_rotate(&eps1, &eps1, Rot); sym_matrix_rotate(&eps2, &eps2, Rot); #define AVG (fill * (EXPR(eps1)) + (1-fill) * (EXPR(eps2))) #define SQR(x) ((x) * (x)) #define EXPR(eps) (-1 / eps.m00) delta.m00 = AVG; #undef EXPR #define EXPR(eps) (eps.m11 - SQR(eps.m01) / eps.m00) delta.m11 = AVG; #undef EXPR #define EXPR(eps) (eps.m22 - SQR(eps.m02) / eps.m00) delta.m22 = AVG; #undef EXPR #define EXPR(eps) (eps.m01 / eps.m00) delta.m01 = AVG; #undef EXPR #define EXPR(eps) (eps.m02 / eps.m00) delta.m02 = AVG; #undef EXPR #define EXPR(eps) (eps.m12 - eps.m02 * eps.m01 / eps.m00) delta.m12 = AVG; #undef EXPR meps.m00 = -1/delta.m00; meps.m11 = delta.m11 - SQR(delta.m01) / delta.m00; meps.m22 = delta.m22 - SQR(delta.m02) / delta.m00; meps.m01 = -delta.m01/delta.m00; meps.m02 = -delta.m02/delta.m00; meps.m12 = delta.m12 - (delta.m02 * delta.m01) / delta.m00; #undef SQR #define SWAP(a,b) { double xxx = a; a = b; b = xxx; } /* invert rotation matrix = transpose */ SWAP(Rot[0][1], Rot[1][0]); SWAP(Rot[0][2], Rot[2][0]); SWAP(Rot[2][1], Rot[1][2]); sym_matrix_rotate(&meps, &meps, Rot); /* rotate back */ #undef SWAP # ifdef DEBUG if(!sym_matrix_positive_definite(&meps)) meep::abort("negative mean epsilon from Kottke algorithm"); # endif sym_matrix_invert(&meps_inv, &meps); switch (component_direction(c)) { case meep::X: case meep::R: chi1inv_row[0] = meps_inv.m00; chi1inv_row[1] = meps_inv.m01; chi1inv_row[2] = meps_inv.m02; break; case meep::Y: case meep::P: chi1inv_row[0] = meps_inv.m01; chi1inv_row[1] = meps_inv.m11; chi1inv_row[2] = meps_inv.m12; break; case meep::Z: chi1inv_row[0] = meps_inv.m02; chi1inv_row[1] = meps_inv.m12; chi1inv_row[2] = meps_inv.m22; break; case meep::NO_DIRECTION: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0; } } static int eps_ever_negative = 0; static meep::field_type func_ft = meep::E_stuff; #ifdef CTL_HAS_COMPLEX_INTEGRATION static cnumber ceps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; double s = 1; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } cnumber ret; double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; ret.re = ep * s; ret.im = s / ep; return ret; } #else static number eps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; double s = 1; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; return ep * s; } static number inveps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; double s = 1; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; return s / ep; } #endif // fallback meaneps using libctl's adaptive cubature routine void geom_epsilon::fallback_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval) { symmetric_matrix chi1p1, chi1p1_inv; material_type material; bool destroy_material = get_material_pt(material, v.center()); material_epsmu(meep::type(c), material, &chi1p1, &chi1p1_inv); if (destroy_material) material_type_destroy(material); if (chi1p1.m01 != 0 || chi1p1.m02 != 0 || chi1p1.m12 != 0 || chi1p1.m00 != chi1p1.m11 || chi1p1.m11 != chi1p1.m22 || chi1p1.m00 != chi1p1.m22) { int rownum = meep::component_direction(c) % 3; if (rownum == 0) { chi1inv_row[0] = chi1p1.m00; chi1inv_row[1] = chi1p1.m01; chi1inv_row[2] = chi1p1.m02; } else if (rownum == 1) { chi1inv_row[0] = chi1p1.m01; chi1inv_row[1] = chi1p1.m11; chi1inv_row[2] = chi1p1.m12; } else { chi1inv_row[0] = chi1p1.m02; chi1inv_row[1] = chi1p1.m12; chi1inv_row[2] = chi1p1.m22; } return; } number esterr; integer errflag, n; number xmin[3], xmax[3]; vector3 gvmin, gvmax; gvmin = vec_to_vector3(v.get_min_corner()); gvmax = vec_to_vector3(v.get_max_corner()); xmin[0] = gvmin.x; xmax[0] = gvmax.x; if (dim == meep::Dcyl) { xmin[1] = gvmin.z; xmin[2] = gvmin.y; xmax[1] = gvmax.z; xmax[2] = gvmax.y; } else{ xmin[1] = gvmin.y; xmin[2] = gvmin.z; xmax[1] = gvmax.y; xmax[2] = gvmax.z; } if (xmin[2] == xmax[2]) n = xmin[1] == xmax[1] ? 1 : 2; else n = 3; double vol = 1; for (int i = 0; i < n; ++i) vol *= xmax[i] - xmin[i]; if (dim == meep::Dcyl) vol *= (xmin[0] + xmax[0]) * 0.5; eps_ever_negative = 0; func_ft = meep::type(c); double meps, minveps; #ifdef CTL_HAS_COMPLEX_INTEGRATION cnumber ret = cadaptive_integration(ceps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag); meps = ret.re / vol; minveps = ret.im / vol; #else meps = adaptive_integration(eps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag) / vol; minveps = adaptive_integration(inveps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag) / vol; #endif if (eps_ever_negative) // averaging negative eps causes instability minveps = 1.0 / (meps = eps(v.center())); { meep::vec gradient(normal_vector(meep::type(c), v)); double n[3] = {0,0,0}; double nabsinv = 1.0/meep::abs(gradient); LOOP_OVER_DIRECTIONS(gradient.dim, k) n[k%3] = gradient.in_direction(k) * nabsinv; int rownum = meep::component_direction(c) % 3; for (int i=0; i<3; ++i) chi1inv_row[i] = n[rownum] * n[i] * (minveps - 1/meps); chi1inv_row[rownum] += 1/meps; } } static double get_chi3(meep::component c, const medium *m) { switch (c) { case meep::Er: case meep::Ex: return m->E_chi3_diag.x; case meep::Ep: case meep::Ey: return m->E_chi3_diag.y; case meep::Ez: return m->E_chi3_diag.z; case meep::Hr: case meep::Hx: return m->H_chi3_diag.x; case meep::Hp: case meep::Hy: return m->H_chi3_diag.y; case meep::Hz: return m->H_chi3_diag.z; default: return 0; } } bool geom_epsilon::has_chi3(meep::component c) { for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_chi3(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_chi3(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_chi3(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::chi3(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double chi3_val; switch (material.which_subclass) { case MTS::MEDIUM: chi3_val = get_chi3(c, material.subclass.medium_data); break; default: chi3_val = 0; } if (destroy_material) material_type_destroy(material); return chi3_val; } static double get_chi2(meep::component c, const medium *m) { switch (c) { case meep::Er: case meep::Ex: return m->E_chi2_diag.x; case meep::Ep: case meep::Ey: return m->E_chi2_diag.y; case meep::Ez: return m->E_chi2_diag.z; case meep::Hr: case meep::Hx: return m->H_chi2_diag.x; case meep::Hp: case meep::Hy: return m->H_chi2_diag.y; case meep::Hz: return m->H_chi2_diag.z; default: return 0; } } bool geom_epsilon::has_chi2(meep::component c) { for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_chi2(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_chi2(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_chi2(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::chi2(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double chi2_val; switch (material.which_subclass) { case MTS::MEDIUM: chi2_val = get_chi2(c, material.subclass.medium_data); break; default: chi2_val = 0; } if (destroy_material) material_type_destroy(material); return chi2_val; } static bool mu_not_1(material_type &m) { return (m.which_subclass == MTS::MEDIUM && (m.subclass.medium_data->mu_diag.x != 1 || m.subclass.medium_data->mu_diag.y != 1 || m.subclass.medium_data->mu_diag.z != 1 || m.subclass.medium_data->mu_offdiag.x != 0 || m.subclass.medium_data->mu_offdiag.y != 0 || m.subclass.medium_data->mu_offdiag.z != 0)); } bool geom_epsilon::has_mu() { for (int i = 0; i < geometry.num_items; ++i) { if (mu_not_1(geometry.items[i].material)) return true; } for (int i = 0; i < extra_materials.num_items; ++i) if (mu_not_1(extra_materials.items[i])) return true; return (mu_not_1(default_material)); } /* a global scalar conductivity to add to all materials; this is mostly for the convenience of Casimir calculations where the global conductivity corresponds to a rotation to complex frequencies */ static double global_D_conductivity = 0, global_B_conductivity = 0; static double get_cnd(meep::component c, const medium *m) { switch (c) { case meep::Dr: case meep::Dx: return m->D_conductivity_diag.x + global_D_conductivity; case meep::Dp: case meep::Dy: return m->D_conductivity_diag.y + global_D_conductivity; case meep::Dz: return m->D_conductivity_diag.z + global_D_conductivity; case meep::Br: case meep::Bx: return m->B_conductivity_diag.x + global_B_conductivity; case meep::Bp: case meep::By: return m->B_conductivity_diag.y + global_B_conductivity; case meep::Bz: return m->B_conductivity_diag.z + global_B_conductivity; default: return 0; } } bool geom_epsilon::has_conductivity(meep::component c) { FOR_DIRECTIONS(d) FOR_SIDES(b) if (cond[d][b].prof) return true; for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_cnd(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_cnd(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_cnd(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::conductivity(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double cond_val; switch (material.which_subclass) { case MTS::MEDIUM: cond_val = get_cnd(c, material.subclass.medium_data); break; default: cond_val = 0; } if (destroy_material) material_type_destroy(material); // if the user specified scalar absorbing layers, add their conductivities // to cond_val (isotropically, for both magnetic and electric conductivity). LOOP_OVER_DIRECTIONS(r.dim, d) { double x = r.in_direction(d); double edge = geometry_edge.in_direction(d) - cond[d][meep::High].L; if (cond[d][meep::High].prof && x >= edge) { int N = cond[d][meep::High].N; double ui = N * (x-edge) / cond[d][meep::High].L; int i = int(ui); if (i >= N) cond_val += cond[d][meep::High].prof[N]; else { double di = ui - i; cond_val += cond[d][meep::High].prof[i] * (1-di) + cond[d][meep::High].prof[i+1] * di; } } edge = cond[d][meep::Low].L - geometry_edge.in_direction(d); if (cond[d][meep::Low].prof && x <= edge) { int N = cond[d][meep::Low].N; double ui = N * (edge-x) / cond[d][meep::Low].L; int i = int(ui); if (i >= N) cond_val += cond[d][meep::Low].prof[N]; else { double di = ui - i; cond_val += cond[d][meep::Low].prof[i] * (1-di) + cond[d][meep::Low].prof[i+1] * di; } } } return cond_val; } /* like susceptibility_equal in ctl-io.cpp, but ignores sigma and id (must be updated manually, re-copying from ctl-io.cpp), if we add new susceptibility subclasses) */ static bool susceptibility_equiv(const susceptibility *o0, const susceptibility *o) { if (o0->which_subclass != o->which_subclass) return 0; #if 0 if (o0->which_subclass == susceptibility::MULTILEVEL_ATOM) { if (!multilevel_atom_equal(o0->subclass.multilevel_atom_data, o->subclass.multilevel_atom_data)) return 0; } #endif else if (o0->which_subclass == susceptibility::DRUDE_SUSCEPTIBILITY) { if (!drude_susceptibility_equal(o0->subclass.drude_susceptibility_data, o->subclass.drude_susceptibility_data)) return 0; } else if (o0->which_subclass == susceptibility::LORENTZIAN_SUSCEPTIBILITY) { if (!lorentzian_susceptibility_equal(o0->subclass.lorentzian_susceptibility_data, o->subclass.lorentzian_susceptibility_data)) return 0; } return 1; } void geom_epsilon::sigma_row(meep::component c, double sigrow[3], const meep::vec &r) { vector3 p = vec_to_vector3(r); boolean inobject; material_type material = material_of_unshifted_point_in_tree_inobject(p, restricted_tree, &inobject); int destroy_material = 0; if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { material = default_material; } if (material.which_subclass == MTS::MATERIAL_FUNCTION) { material = eval_material_func(material.subclass. material_function_data->material_func, p); destroy_material = 1; } sigrow[0] = sigrow[1] = sigrow[2] = 0.0; if (material.which_subclass == MTS::MEDIUM) { susceptibility_list slist = type(c) == meep::E_stuff ? material.subclass.medium_data->E_susceptibilities : material.subclass.medium_data->H_susceptibilities; for (int j = 0; j < slist.num_items; ++j) if (susceptibility_equiv(&slist.items[j], ¤t_pol->user_s)) { int ic = meep::component_index(c); switch (ic) { // which row of the sigma tensor to return case 0: sigrow[0] = slist.items[j].sigma_diag.x; sigrow[1] = slist.items[j].sigma_offdiag.x; sigrow[2] = slist.items[j].sigma_offdiag.y; break; case 1: sigrow[0] = slist.items[j].sigma_offdiag.x; sigrow[1] = slist.items[j].sigma_diag.y; sigrow[2] = slist.items[j].sigma_offdiag.z; break; default: // case 2: sigrow[0] = slist.items[j].sigma_offdiag.y; sigrow[1] = slist.items[j].sigma_offdiag.z; sigrow[2] = slist.items[j].sigma_diag.z; break; } break; } } if (destroy_material) material_type_destroy(material); } #if 0 /* make multilevel_susceptibility from scheme input data */ static meep::susceptibility *make_multilevel_sus(const multilevel_atom *d) { if (!d || d->transitions.num_items == 0) return NULL; // the user can number the levels however she wants, but we // will renumber them to 0...(L-1) int minlev = d->transitions.items[0].to_level; int maxlev = minlev; for (int t = 0; t < d->transitions.num_items; ++t) { if (minlev > d->transitions.items[t].from_level) minlev = d->transitions.items[t].from_level; if (minlev > d->transitions.items[t].to_level) minlev = d->transitions.items[t].to_level; if (maxlev < d->transitions.items[t].from_level) maxlev = d->transitions.items[t].from_level; if (maxlev < d->transitions.items[t].to_level) maxlev = d->transitions.items[t].to_level; } int L = maxlev - minlev + 1; // number of atom levels // count number of radiative transitions int T = 0; for (int t = 0; t < d->transitions.num_items; ++t) if (d->transitions.items[t].frequency != 0) ++T; if (T == 0) return NULL; // don't bother if there is no radiative coupling // non-radiative transition-rate matrix Gamma meep::realnum *Gamma = new meep::realnum[L * L]; memset(Gamma, 0, sizeof(meep::realnum) * (L*L)); for (int t = 0; t < d->transitions.num_items; ++t) { int i = d->transitions.items[t].from_level - minlev; int j = d->transitions.items[t].to_level - minlev; Gamma[i*L+i] += d->transitions.items[t].transition_rate; Gamma[j*L+i] -= d->transitions.items[t].transition_rate; } // initial populations of each level meep::realnum *N0 = new meep::realnum[L]; memset(N0, 0, sizeof(meep::realnum) * L); for (int p = 0; p < d->initial_populations.num_items && p < L; ++p) N0[p] = d->initial_populations.items[p]; meep::realnum *alpha = new meep::realnum[L * T]; memset(alpha, 0, sizeof(meep::realnum) * (L * T)); meep::realnum *omega = new meep::realnum[T]; meep::realnum *gamma = new meep::realnum[T]; meep::realnum *sigmat = new meep::realnum[T * 5]; for (int t = 0, tr = 0; t < d->transitions.num_items; ++t) if (d->transitions.items[t].frequency != 0) { omega[tr] = d->transitions.items[t].frequency; // no 2*pi here gamma[tr] = d->transitions.items[t].gamma; if (dim == meep::Dcyl) { sigmat[5*tr + meep::R] = d->transitions.items[t].sigma_diag.x; sigmat[5*tr + meep::P] = d->transitions.items[t].sigma_diag.y; sigmat[5*tr + meep::Z] = d->transitions.items[t].sigma_diag.z; } else { sigmat[5*tr + meep::X] = d->transitions.items[t].sigma_diag.x; sigmat[5*tr + meep::Y] = d->transitions.items[t].sigma_diag.y; sigmat[5*tr + meep::Z] = d->transitions.items[t].sigma_diag.z; } int i = d->transitions.items[t].from_level - minlev; int j = d->transitions.items[t].to_level - minlev; alpha[i * T + tr] = -1.0 / omega[tr]; alpha[j * T + tr] = +1.0 / omega[tr]; ++tr; } meep::multilevel_susceptibility *s = new meep::multilevel_susceptibility(L, T, Gamma, N0, alpha, omega, gamma, sigmat); delete[] Gamma; delete[] N0; delete[] alpha; delete[] omega; delete[] gamma; delete[] sigmat; return s; } #endif // add a polarization to the list if it is not already there static pol *add_pol(pol *pols, const susceptibility *user_s) { struct pol *p = pols; while (p && !susceptibility_equiv(user_s, &p->user_s)) p = p->next; if (!p) { p = new pol; susceptibility_copy(user_s, &p->user_s); p->next = pols; pols = p; } return pols; } static pol *add_pols(pol *pols, const susceptibility_list slist) { for (int j = 0; j < slist.num_items; ++j) pols = add_pol(pols, &slist.items[j]); return pols; } void geom_epsilon::add_susceptibilities(meep::structure *s) { add_susceptibilities(meep::E_stuff, s); add_susceptibilities(meep::H_stuff, s); } void geom_epsilon::add_susceptibilities(meep::field_type ft, meep::structure *s) { pol *pols = 0; // construct a list of the unique susceptibilities in the geometry: for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? geometry.items[i].material .subclass.medium_data->E_susceptibilities : geometry.items[i].material .subclass.medium_data->H_susceptibilities); } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? extra_materials.items[i] .subclass.medium_data->E_susceptibilities : extra_materials.items[i] .subclass.medium_data->H_susceptibilities); if (default_material.which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? default_material.subclass.medium_data->E_susceptibilities : default_material.subclass.medium_data->H_susceptibilities); for (struct pol *p = pols; p; p = p->next) { meep::susceptibility *sus = NULL; switch (p->user_s.which_subclass) { case susceptibility::LORENTZIAN_SUSCEPTIBILITY: { lorentzian_susceptibility *d = p->user_s.subclass.lorentzian_susceptibility_data; if (d->which_subclass == lorentzian_susceptibility::NOISY_LORENTZIAN_SUSCEPTIBILITY) { noisy_lorentzian_susceptibility *nd = d->subclass.noisy_lorentzian_susceptibility_data; master_printf("noisy lorentzian susceptibility: frequency=%g, gamma=%g, amp = %g\n", d->frequency, d->gamma, nd->noise_amp); sus = new meep::noisy_lorentzian_susceptibility(nd->noise_amp, d->frequency, d->gamma); } else { // just a Lorentzian master_printf("lorentzian susceptibility: frequency=%g, gamma=%g\n", d->frequency, d->gamma); sus = new meep::lorentzian_susceptibility(d->frequency, d->gamma); } break; } case susceptibility::DRUDE_SUSCEPTIBILITY: { drude_susceptibility *d = p->user_s.subclass.drude_susceptibility_data; if (d->which_subclass == drude_susceptibility::NOISY_DRUDE_SUSCEPTIBILITY) { noisy_drude_susceptibility *nd = d->subclass.noisy_drude_susceptibility_data; master_printf("noisy drude susceptibility: frequency=%g, gamma=%g, amp = %g\n", d->frequency, d->gamma, nd->noise_amp); sus = new meep::noisy_lorentzian_susceptibility(nd->noise_amp, d->frequency, d->gamma, true); } else { // just a Drude master_printf("drude susceptibility: frequency=%g, gamma=%g\n", d->frequency, d->gamma); sus = new meep::lorentzian_susceptibility(d->frequency, d->gamma, true); } break; } #if 0 case susceptibility::MULTILEVEL_ATOM: { multilevel_atom *d = p->user_s.subclass.multilevel_atom_data; sus = make_multilevel_sus(d); break; } #endif default: meep::abort("unknown susceptibility type"); } current_pol = p; if (sus) { s->add_susceptibility(*this, ft, *sus); delete sus; } } current_pol = NULL; while (pols) { struct pol *p = pols; pols = pols->next; susceptibility_destroy(p->user_s); delete p; } } /***********************************************************************/ // wrapper around Scheme function for PML profile static double scm_pml_profile(double u, void *f_) { SCM f = (SCM) f_; return ctl_convert_number_to_c(gh_call1(f, ctl_convert_number_to_scm(u))); } // for passing to multidimensional integration routine static double scm_pml_profile2(int dim, double *u, void *f_) { SCM f = (SCM) f_; (void) dim; return ctl_convert_number_to_c(gh_call1(f, ctl_convert_number_to_scm(*u))); } // for integrating profile(u) * u static double scm_pml_profile2u(int dim, double *u, void *f_) { SCM f = (SCM) f_; (void) dim; return ctl_convert_number_to_c(gh_call1(f, ctl_convert_number_to_scm(*u))) * (*u); } meep::structure *make_structure(int dims, vector3 size, vector3 center, double resolution, bool enable_averaging, double subpixel_tol, int subpixel_maxeval, bool ensure_periodicity_p, geometric_object_list geometry, material_type_list extra_materials, material_type default_mat, const char *eps_input_file, pml_list pml_layers, symmetry_list symmetries, int num_chunks, double Courant, double global_D_conductivity_, double global_B_conductivity_) { master_printf("-----------\nInitializing structure...\n"); // only cartesian lattices are currently allowed geom_initialize(); geometry_center = center; global_D_conductivity = global_D_conductivity_; global_B_conductivity = global_B_conductivity_; number no_size = 2.0 / ctl_get_number("infinity"); if (size.x <= no_size) size.x = 0.0; if (size.y <= no_size) size.y = 0.0; if (size.z <= no_size) size.z = 0.0; set_dimensions(dims); geometry_lattice.size = size; geometry_edge = vector3_to_vec(size) * 0.5; master_printf("Working in %s dimensions.\n", meep::dimension_name(dim)); master_printf("Computational cell is %g x %g x %g with resolution %g\n", size.x, size.y, size.z, resolution); meep::grid_volume gv; switch (dims) { case 0: case 1: gv = meep::vol1d(size.z, resolution); break; case 2: gv = meep::vol2d(size.x, size.y, resolution); break; case 3: gv = meep::vol3d(size.x, size.y, size.z, resolution); break; case CYLINDRICAL: gv = meep::volcyl(size.x, size.z, resolution); break; default: CK(0, "unsupported dimensionality"); } gv.center_origin(); gv.shift_origin(vector3_to_vec(center)); meep::symmetry S; for (int i = 0; i < symmetries.num_items; ++i) switch (symmetries.items[i].which_subclass) { case symmetry::SYMMETRY_SELF: break; // identity case symmetry::MIRROR_SYM: S = S + meep::mirror(meep::direction(symmetries.items[i].direction), gv) * std::complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; case symmetry::ROTATE2_SYM: S = S + meep::rotate2(meep::direction(symmetries.items[i].direction), gv) * std::complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; case symmetry::ROTATE4_SYM: S = S + meep::rotate4(meep::direction(symmetries.items[i].direction), gv) * std::complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; } meep::boundary_region br; for (int i = 0; i < pml_layers.num_items; ++i) if (pml_layers.items[i].which_subclass == pml::PML_SELF) { double umin = 0, umax = 1, esterr; int errflag; using namespace meep; if (pml_layers.items[i].direction == -1) { LOOP_OVER_DIRECTIONS(gv.dim, d) { if (pml_layers.items[i].side == -1) { FOR_SIDES(b) br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), pml_layers.items[i].mean_stretch, scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), adaptive_integration(scm_pml_profile2u, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), d, b); } else br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), pml_layers.items[i].mean_stretch, scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), adaptive_integration(scm_pml_profile2u, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), d, (meep::boundary_side) pml_layers.items[i].side); } } else { if (pml_layers.items[i].side == -1) { FOR_SIDES(b) br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), pml_layers.items[i].mean_stretch, scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), adaptive_integration(scm_pml_profile2u, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), (meep::direction) pml_layers.items[i].direction, b); } else br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), pml_layers.items[i].mean_stretch, scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), adaptive_integration(scm_pml_profile2u, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), (meep::direction) pml_layers.items[i].direction, (meep::boundary_side) pml_layers.items[i].side); } } ensure_periodicity = ensure_periodicity_p; default_material = default_mat; read_epsilon_file(eps_input_file); geom_epsilon geps(geometry, extra_materials, gv.pad().surroundings()); for (int i = 0; i < pml_layers.num_items; ++i) if (pml_layers.items[i].which_subclass == pml::ABSORBER) { pml layer = pml_layers.items[i]; if (layer.direction == -1) { LOOP_OVER_DIRECTIONS(gv.dim, d) { if (layer.side == -1) { FOR_SIDES(b) geps.set_cond_profile(d, b, layer.thickness, gv.inva * 0.5, scm_pml_profile2, layer.pml_profile, pow(layer.R_asymptotic, layer.strength)); } else geps.set_cond_profile(d, (meep::boundary_side) layer.side, layer.thickness, gv.inva * 0.5, scm_pml_profile2, layer.pml_profile, pow(layer.R_asymptotic, layer.strength)); } } else if (layer.side == -1) { FOR_SIDES(b) geps.set_cond_profile((meep::direction) layer.direction, b, layer.thickness, gv.inva * 0.5, scm_pml_profile2, layer.pml_profile, pow(layer.R_asymptotic, layer.strength)); } else geps.set_cond_profile((meep::direction) layer.direction, (meep::boundary_side) layer.side, layer.thickness, gv.inva * 0.5, scm_pml_profile2, layer.pml_profile, pow(layer.R_asymptotic, layer.strength)); } if (subpixel_maxeval < 0) subpixel_maxeval = 0; // no limit meep::structure *s = new meep::structure(gv, geps, br, S, num_chunks, Courant, enable_averaging, subpixel_tol, subpixel_maxeval); geps.add_susceptibilities(s); master_printf("-----------\n"); return s; } /*************************************************************************/ meep-1.3/libctl/meep_renames.i0000644000175400001440000001375112506540665013327 00000000000000// AUTOMATICALLY GENERATED -- DO NOT EDIT %rename(meep_boundary_region) meep::boundary_region; %rename(meep_continuous_src_time) meep::continuous_src_time; %rename(meep_custom_src_time) meep::custom_src_time; %rename(meep_dft_chunk) meep::dft_chunk; %rename(meep_dft_flux) meep::dft_flux; %rename(meep_dft_force) meep::dft_force; %rename(meep_dft_ldos) meep::dft_ldos; %rename(meep_dft_near2far) meep::dft_near2far; %rename(meep_fields_chunk) meep::fields_chunk; %rename(meep_fields) meep::fields; %rename(meep_flux_vol) meep::flux_vol; %rename(meep_gaussian_src_time) meep::gaussian_src_time; %rename(meep_grace) meep::grace; %rename(meep_grid_volume) meep::grid_volume; %rename(meep_h5file) meep::h5file; %rename(meep_initialize) meep::initialize; %rename(meep_ivec) meep::ivec; %rename(meep_lorentzian_susceptibility) meep::lorentzian_susceptibility; %rename(meep_material_function) meep::material_function; %rename(meep_monitor_point) meep::monitor_point; %rename(meep_multilevel_susceptibility) meep::multilevel_susceptibility; %rename(meep_noisy_lorentzian_susceptibility) meep::noisy_lorentzian_susceptibility; %rename(meep_simple_material_function) meep::simple_material_function; %rename(meep_src_time) meep::src_time; %rename(meep_structure_chunk) meep::structure_chunk; %rename(meep_structure) meep::structure; %rename(meep_susceptibility) meep::susceptibility; %rename(meep_symmetry) meep::symmetry; %rename(meep_vec) meep::vec; %rename(meep_volume_list) meep::volume_list; %rename(meep_volume) meep::volume; %rename(meep_abort) meep::abort; %rename(meep_abs) meep::abs; %rename(meep_all_wait) meep::all_wait; %rename(meep_am_master) meep::am_master; %rename(meep_am_really_master) meep::am_really_master; %rename(meep_and_to_all) meep::and_to_all; %rename(meep_begin_critical_section) meep::begin_critical_section; %rename(meep_begin_global_communications) meep::begin_global_communications; %rename(meep_BesselJ) meep::BesselJ; %rename(meep_broadcast) meep::broadcast; %rename(meep_clean_vec) meep::clean_vec; %rename(meep_component_direction) meep::component_direction; %rename(meep_component_index) meep::component_index; %rename(meep_component_name) meep::component_name; %rename(meep_coordinate_mismatch) meep::coordinate_mismatch; %rename(meep_count_processors) meep::count_processors; %rename(meep_create_output_file) meep::create_output_file; %rename(meep_cycle_component) meep::cycle_component; %rename(meep_cycle_direction) meep::cycle_direction; %rename(meep_deal_with_ctrl_c) meep::deal_with_ctrl_c; %rename(meep_debug_printf) meep::debug_printf; %rename(meep_derived_component_func) meep::derived_component_func; %rename(meep_dimension_name) meep::dimension_name; %rename(meep_direction_component) meep::direction_component; %rename(meep_direction_name) meep::direction_name; %rename(meep_divide_parallel_processes) meep::divide_parallel_processes; %rename(meep_do_harminv) meep::do_harminv; %rename(meep_end_critical_section) meep::end_critical_section; %rename(meep_end_divide_parallel) meep::end_divide_parallel; %rename(meep_end_global_communications) meep::end_global_communications; %rename(meep_field_type_component) meep::field_type_component; %rename(meep_first_field_component) meep::first_field_component; %rename(meep_flip) meep::flip; %rename(meep_gaussian_random) meep::gaussian_random; %rename(meep_green2d) meep::green2d; %rename(meep_green3d) meep::green3d; %rename(meep_has_direction) meep::has_direction; %rename(meep_has_field_direction) meep::has_field_direction; %rename(meep_identity) meep::identity; %rename(meep_is_B) meep::is_B; %rename(meep_is_derived) meep::is_derived; %rename(meep_is_D) meep::is_D; %rename(meep_is_electric) meep::is_electric; %rename(meep_is_energydensity) meep::is_energydensity; %rename(meep_is_magnetic) meep::is_magnetic; %rename(meep_is_poynting) meep::is_poynting; %rename(meep_is_tm) meep::is_tm; %rename(meep_iveccyl) meep::iveccyl; %rename(meep_load_dft_hdf5) meep::load_dft_hdf5; %rename(meep_make_casimir_gfunc_kz) meep::make_casimir_gfunc_kz; %rename(meep_make_casimir_gfunc) meep::make_casimir_gfunc; %rename(meep_make_output_directory) meep::make_output_directory; %rename(meep_master_fclose) meep::master_fclose; %rename(meep_master_fopen) meep::master_fopen; %rename(meep_master_fprintf) meep::master_fprintf; %rename(meep_master_printf) meep::master_printf; %rename(meep_max) meep::max; %rename(meep_max_to_all) meep::max_to_all; %rename(meep_max_to_master) meep::max_to_master; %rename(meep_min) meep::min; %rename(meep_mirror) meep::mirror; %rename(meep_my_global_rank) meep::my_global_rank; %rename(meep_my_rank) meep::my_rank; %rename(meep_number_of_directions) meep::number_of_directions; %rename(meep_one_ivec) meep::one_ivec; %rename(meep_one_vec) meep::one_vec; %rename(meep_or_to_all) meep::or_to_all; %rename(meep_partial_sum_to_all) meep::partial_sum_to_all; %rename(meep_pml) meep::pml; %rename(meep_pml_quadratic_profile) meep::pml_quadratic_profile; %rename(meep_random_int) meep::random_int; %rename(meep_rotate2) meep::rotate2; %rename(meep_rotate4) meep::rotate4; %rename(meep_r_to_minus_r_symmetry) meep::r_to_minus_r_symmetry; %rename(meep_save_dft_hdf5) meep::save_dft_hdf5; %rename(meep_send) meep::send; %rename(meep_set_random_seed) meep::set_random_seed; %rename(meep_src_times_equal) meep::src_times_equal; %rename(meep_start_at_direction) meep::start_at_direction; %rename(meep_stop_at_direction) meep::stop_at_direction; %rename(meep_sum_to_all) meep::sum_to_all; %rename(meep_sum_to_master) meep::sum_to_master; %rename(meep_trash_output_directory) meep::trash_output_directory; %rename(meep_type) meep::type; %rename(meep_uniform_random) meep::uniform_random; %rename(meep_unit_ivec) meep::unit_ivec; %rename(meep_unit_vec) meep::unit_vec; %rename(meep_veccyl) meep::veccyl; %rename(meep_vol1d) meep::vol1d; %rename(meep_vol2d) meep::vol2d; %rename(meep_vol3d) meep::vol3d; %rename(meep_volcyl) meep::volcyl; %rename(meep_volone) meep::volone; %rename(meep_voltwo) meep::voltwo; %rename(meep_wall_time) meep::wall_time; %rename(meep_zero_ivec) meep::zero_ivec; %rename(meep_zero_vec) meep::zero_vec; meep-1.3/configure.ac0000644000175400001440000004037212506540260011520 00000000000000# Process this file with autoconf to produce a configure script. AC_INIT(meep, 1.3, meep@ab-initio.mit.edu) AC_CONFIG_SRCDIR(src/step.cpp) # Shared-library version number; indicates api compatibility, and is # not the same as the "public" version number. (Don't worry about this # except for public releases.) Note that any change to a C++ class # definition (in the .hpp file) generally breaks binary compatibility. SHARED_VERSION_INFO="8:0:0" # CURRENT:REVISION:AGE AM_INIT_AUTOMAKE([foreign check-news color-tests parallel-tests silent-rules 1.11]) AM_SILENT_RULES(yes) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE AC_SUBST(SHARED_VERSION_INFO) AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default MEEP_SUFFIX="" ############################################################################## # Check for mpiCC immediately after getting C++ compiler... AC_PROG_CXX AC_LANG([C++]) # Check for MPI library AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi],[enable MPI parallelization])], with_mpi=$withval, with_mpi=no) if test "x$with_mpi" = "xyes"; then ACX_MPI([],[AC_MSG_ERROR([could not find mpi library for --with-mpi])]) CXX=$MPICXX MEEP_SUFFIX="${MEEP_SUFFIX}_mpi" # Detect stupid MPICH problem with SEEK_SET conflicting between # the mpi.h header file and the stdio.h header file in C++ AC_MSG_CHECKING([for extra flag needed to combine stdio.h and mpi.h]) for flag in none -DMPICH_IGNORE_CXX_SEEK unknown; do if test "x$flag" = xunknown; then break; fi save_CPPFLAGS=$CPPFLAGS if test "x$flag" != xnone; then CPPFLAGS="$CPPFLAGS $flag"; fi AC_TRY_COMPILE([#include #include ], [], [break], []) CPPFLAGS=$save_CPPFLAGS done AC_MSG_RESULT($flag) if test "x$flag" = xunknown; then AC_MSG_CHECKING([if we can combine stdio.h and mpi.h by undef'ing SEEK_*]) AC_TRY_COMPILE([#include #undef SEEK_SET #undef SEEK_END #undef SEEK_CUR #include ], [], [AC_MSG_RESULT(yes) AC_DEFINE([NEED_UNDEF_SEEK_FOR_MPI], 1, [Define if mpi.h needs SEEK macros to be undefined])], [AC_MSG_RESULT(no) AC_MSG_ERROR([can't include stdio.h and mpi.h in same file])]) fi fi ############################################################################## # Compiler flags # Pick "good" compiler flags(?) AX_CXX_MAXOPT AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[compile for debugging])], enable_debug=$enableval, enable_debug=no) if test "$enable_debug" = "yes"; then CFLAGS="-g" CXXFLAGS="-g" FFLAGS="-g" AC_DEFINE(DEBUG,1,[define to enable debugging code]) fi # Add lots of compiler warnings in maintainer mode if we are using gcc: # (The variable $GXX is set to "yes" by AC_PROG_CXX if we are using g++.) if test "$GXX" = "yes" && test "$USE_MAINTAINER_MODE" = yes; then CXXFLAGS="$CXXFLAGS -Wall -W" fi # For some annoying reason, g++ requires you to compile # all code with -march if you compile any code with -march, # otherwise segfaults can occur (observed in g++ 3.3.5). # We also need to be careful about -malign-double. ARCHFLAG="" for flg in $CXXFLAGS; do case $flg in -march=*|-mcpu=*|-malign*) ARCHFLAG="$ARCHFLAG $flg" ;; esac done AC_SUBST(ARCHFLAG) ############################################################################## # More checks AC_PROG_LIBTOOL AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html) if test -z "$LATEX2HTML"; then AC_MSG_WARN([Cannot find latex2html in your path!]) # FIXME: use standard 'missing' script from automake LATEX2HTML='echo not running latex2html...' fi AC_SUBST(LATEX2HTML) AC_CHECK_LIB(m, sin) AC_CHECK_LIB(fftw3, fftw_plan_dft_1d, [], [AC_CHECK_LIB(dfftw, fftw_create_plan, [], [AC_CHECK_LIB(fftw, fftw_create_plan, [], [AC_MSG_WARN([FFTW needed for MPB])])])]) ########################################################################### AC_PROG_F77 AC_F77_WRAPPERS if test "x$with_lapack" != xno -o "x$with_blas" != xno; then ACX_BLAS ACX_LAPACK LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" fi ########################################################################### # Harminv library # First, try pkg-config, if it is installed. Note that, annoyingly, # pkg-config doesn't look in /usr/local by default, so we have to # add this to the path for that common case. It also doesn't give # us a way to print its default path, grr, so we have to assume that this # is /usr/lib/pkgconfig. PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH PKG_CHECK_MODULES(HARMINV, harminv >= 1.1, [CFLAGS="$CFLAGS $HARMINV_CFLAGS"; LIBS="$HARMINV_LIBS $LIBS"; have_harminv=yes], [have_harminv=no]) # As a fallback, check manually for BLAS/LAPACK and harminv libraries: if test $have_harminv = no; then if test "x$acx_lapack_ok" = x; then ACX_BLAS ACX_LAPACK([], [AC_MSG_WARN([BLAS/LAPACK needed for harminv])]) LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" elif test "x$acx_lapack_ok" = xno; then AC_MSG_WARN([BLAS/LAPACK needed for harminv]) fi save_CC=$CC CC=$CXX # harminv test must use $CXX since harminv may be a C++ lib # just use lapack/blas in default libs since we always need them AC_CHECK_LIB(harminv, harminv_get_freq_error, [have_harminv=yes; LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"], [AC_MSG_WARN([harminv support is disabled])], [$LAPACK_LIBS $BLAS_LIBS $FLIBS]) CC=$save_CC fi if test $have_harminv = yes; then AC_DEFINE([HAVE_HARMINV],[1],[Define if you have libharminv]) fi ########################################################################### # MPB library AC_CHECK_HEADER(mpb.h, [have_mpb=maybe], [have_mpb=no]) if test $have_mpb = maybe; then if test "x$acx_lapack_ok" = x -a "$have_harminv" = xno; then ACX_BLAS ACX_LAPACK([], [AC_MSG_WARN([BLAS/LAPACK needed for MPB])]) LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" elif test "x$acx_lapack_ok" = xno; then AC_MSG_WARN([BLAS/LAPACK needed for MPB]) fi AC_CHECK_LIB(mpb, maxwell_target_operator1, [have_mpb=yes; LIBS="-lmpb $LIBS"], [AC_CHECK_LIB(mpb, maxwell_target_operator1, [have_mpb=yes; LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"], [AC_MSG_WARN([MPB support is disabled])], [$LAPACK_LIBS $BLAS_LIBS $FLIBS])]) if test $have_mpb = yes; then AC_DEFINE([HAVE_MPB], [1], [Define if you have libmpb]) fi fi ############################################################################## # GNU Scientific Library AC_CHECK_FUNC(cblas_cgemm, [], [AC_CHECK_LIB(gslcblas, cblas_cgemm)]) AC_CHECK_LIB(gsl, gsl_sf_bessel_Jn, [], [AC_MSG_WARN([Missing GNU GSL library...Bessel-function field initialization will not be supported.])]) ############################################################################## # Check for HDF5 library AC_ARG_WITH(hdf5, [AC_HELP_STRING([--without-hdf5],[do not allow HDF5 output])], ok=$withval, ok=yes) if test "$ok" = "yes"; then AC_CHECK_LIB(z,deflate, [],[AC_MSG_WARN([zlib is required for HDF5!])]) save_CC=$CC if test "x$with_mpi" = "xyes"; then CC=$MPICXX fi save_LIBS_0="$LIBS" # save, to check later if we found any library AC_CHECK_LIB(hdf5, H5Pcreate, [ AC_CHECK_HEADERS(hdf5.h, [LIBS="-lhdf5 $LIBS" AC_DEFINE(HAVE_HDF5,1,[Define if we have & link HDF5])])]) if test x"$save_LIBS_0" = x"$LIBS"; then AC_MSG_WARN([Couldn't find the HDF5 library!! Switching to --without-hdf5.]) fi CC=$save_CC if test "x$with_mpi" = "xyes"; then AC_CHECK_FUNCS(H5Pset_mpi H5Pset_fapl_mpio) fi fi ############################################################################## RUNCODE="" if test "x$with_mpi" = "xyes"; then AC_CHECK_PROG(MPIRUN, mpirun, mpirun) RUNCODE="$MPIRUN -np 4" # always use 4 processes for 'make check' fi AC_SUBST(RUNCODE) ############################################################################## # Libraries and flags (other than -lmeep) required to link Meep: MEEPLIBS="$LDFLAGS $LIBS" AC_SUBST(MEEPLIBS) ############################################################################## # subsequent libraries are only for libctl front end meep_save_LIBS=$LIBS AC_ARG_WITH(libctl, [AC_HELP_STRING([--with-libctl=],[specify libctl directory])], with_libctl=$withval, with_libctl=yes) if test "x$with_libctl" = "xno"; then : elif test "x$with_libctl" != "xyes"; then LIBCTL_DIR="$with_libctl" fi AM_CONDITIONAL(WITH_LIBCTL, test "x$with_libctl" != xno) ############################################################################## # Check for Guile library and its behavior (for libctl front end): if test "x$with_libctl" != xno; then AC_CHECK_PROG(GUILE_CONFIG, guile-config, guile-config, unknown) if test "x$GUILE_CONFIG" = "xunknown"; then AC_CHECK_LIB(readline, readline) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(guile-ltdl, scm_lt_dlinit, [], [AC_CHECK_LIB(ltdl, dlopen)]) AC_CHECK_LIB(guile, gh_eval_str, [], [AC_CHECK_LIB(guile, scm_eval_string, [], [AC_MSG_ERROR([linking to guile failed])])]) else CPPFLAGS="$CPPFLAGS `$GUILE_CONFIG compile`" LIBS="`$GUILE_CONFIG link` $LIBS" AC_MSG_CHECKING([if linking to guile works]) AC_TRY_LINK_FUNC(gh_enter, AC_MSG_RESULT(yes), [AC_TRY_LINK_FUNC(scm_boot_guile, AC_MSG_RESULT(yes), [AC_MSG_RESULT(no) AC_MSG_ERROR([guile-config is broken])])]) fi AC_CHECK_HEADERS([libguile.h guile/gh.h]) # Check how smob types work in this Guile version: AC_CHECK_FUNCS(scm_make_smob_type) AC_MSG_CHECKING([for SCM_SMOB_PREDICATE]) AC_TRY_LINK([#include #include ], [int x; SCM_SMOB_PREDICATE(1,x);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_SMOB_PREDICATE, 1, [define if we have SCM_SMOB_PREDICATE]) fi AC_MSG_CHECKING([for SCM_SMOB_DATA]) AC_TRY_LINK([#include #include ], [int x; SCM_SMOB_DATA(x);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_SMOB_DATA, 1, [define if we have SCM_SMOB_DATA]) fi AC_MSG_CHECKING([for SCM_NEWSMOB]) AC_TRY_LINK([#include #include ], [int x; SCM_NEWSMOB(x,1,0);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_NEWSMOB, 1, [define if we have SCM_NEWSMOB]) fi # Check how to activate Guile readline support: ACTIVATE_READLINE="" if test "x$cross_compiling" = xno; then AC_MSG_CHECKING(how to activate readline in Guile) ractivate="(use-modules (readline-activator)) (activate-readline)" if guile -c "$ractivate" > /dev/null 2>&1; then AC_MSG_RESULT(readline-activator) ACTIVATE_READLINE="$ractivate" else ractivate="(use-modules (ice-9 readline)) (activate-readline)" if guile -c "$ractivate" >& /dev/null; then AC_MSG_RESULT(ice-9 readline) ACTIVATE_READLINE="$ractivate" else AC_MSG_RESULT(cannot) ACTIVATE_READLINE="" fi fi fi AC_SUBST(ACTIVATE_READLINE) fi # if with_libctl ############################################################################## # Check for libctl library and files if test "x$with_libctl" != xno; then AC_MSG_CHECKING([for libctl dir]) if test x != x"$LIBCTL_DIR" -a ! -r "$LIBCTL_DIR/base/ctl.scm"; then LIBCTL_DIR="" fi if test x = x"$LIBCTL_DIR" -a -r /usr/local/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/local/share/libctl" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl3/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl3" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl" fi if test x = x"$LIBCTL_DIR"; then AC_MSG_ERROR([could not find libctl files; use --with-libctl=]) fi AC_MSG_RESULT($LIBCTL_DIR) AC_SUBST(LIBCTL_DIR) AC_CHECK_PROGS(GEN_CTL_IO, gen-ctl-io, echo) if test x"$GEN_CTL_IO" = xecho; then AC_MSG_ERROR([could not find gen-ctl-io program; check your PATH]) fi # check for -lctl: AC_CHECK_LIB(ctl, ctl_get_vector3, [], [AC_MSG_ERROR([Couldn't find the required libctl library.])]) # check for ctl.h (Fedora puts it in /usr/include/ctl, grrr) CTL_H_CPPFLAG="" AC_CHECK_HEADER(ctl.h, [CTL_H_CPPFLAG=" "], [ save_CPPFLAGS=$CPPFLAGS AC_MSG_CHECKING([for alternate ctl.h location]) for ctl_h_path in /usr/include/ctl /usr/local/include/ctl; do CPPFLAGS="$save_CPPFLAGS -I$ctl_h_path" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[])], [CTL_H_CPPFLAG=-I$ctl_h_path; break]) done AC_MSG_RESULT([$CTL_H_CPPFLAG]) CPPFLAGS=$save_CPPFLAGS]) if test "x$CTL_H_CPPFLAG" = "x"; then AC_MSG_ERROR([Couldn't find the ctl.h header file for libctl.]) fi AC_SUBST(CTL_H_CPPFLAG) save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $CTL_H_CPPFLAG" # Check libctl version >= LIBCTL_MAJOR.LIBCTL_MINOR.LIBCTL_BUGFIX LIBCTL_MAJOR=3; LIBCTL_MINOR=2; LIBCTL_BUGFIX=0 AC_MSG_CHECKING([whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}]) AC_EGREP_CPP(yes, [[ #include #if LIBCTL_MAJOR_VERSION > $LIBCTL_MAJOR || (LIBCTL_MAJOR_VERSION == $LIBCTL_MAJOR && (LIBCTL_MINOR_VERSION > $LIBCTL_MINOR || (LIBCTL_MINOR_VERSION == $LIBCTL_MINOR && LIBCTL_BUGFIX_VERSION >= $LIBCTL_BUGFIX))) yes #endif ]], [AC_MSG_RESULT(ok)], [AC_MSG_ERROR([libctl version ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX} or later is required])]) CPPFLAGS=$save_CPPFLAGS # Check for libctl_quiet feature (in libctl 3.1.1 or later): AC_MSG_CHECKING([for libctl_quiet feature]) if grep libctl_quiet "$LIBCTL_DIR/base/main.c" 2>&1 > /dev/null; then AC_MSG_RESULT(yes) AC_DEFINE([HAVE_LIBCTL_QUIET], [1], [If we have the libctl_quiet variable]) else AC_MSG_RESULT(no) fi # On IRIX, basename/dirname functions in libctl/main.c require -lgen AC_CHECK_LIB(gen, basename) fi # if with_libctl ############################################################################## LIBCTL_LIBS=$LIBS AC_SUBST(LIBCTL_LIBS) LIBS=$meep_save_LIBS ############################################################################## # The following function is used only for debugging. Note that # we must test for it *after* setting the compiler flags (which # affect whether it is declared, as it is a GNU extension). # We need to #include because that somehow affects whether # the function is declared with older gcc versions. We need # to use AC_TRY_COMPILE because the test in AC_HAVE_DECL seems # to be optimized out. AC_CHECK_FUNCS(feenableexcept) dnl GNU libc fp exception control function AC_MSG_CHECKING([whether feenableexcept declaration is usable]) feenableexcept_decl_ok=yes AC_TRY_COMPILE([#include #define _GNU_SOURCE 1 #include ], [feenableexcept(0);], [AC_DEFINE([HAVE_DECL_FEENABLEEXCEPT],[1],[Define if fenv.h declares this.])], [feenableexcept_decl_ok=no]) AC_MSG_RESULT($feenableexcept_decl_ok) ############################################################################## # See if we need to catch SIGFPE to avoid crashing on underflow exceptions # etcetera, since some stupid operating systems (e.g. Alpha/Tru64) crash on # SIGFPE by default. AC_MSG_CHECKING([whether to catch and ignore SIGFPE signals]) AC_RUN_IFELSE([AC_LANG_PROGRAM([], [volatile double x=1,y=0; return x/y;])], [ignore_sigfpe=no], [ignore_sigfpe=yes], [ignore_sigfpe=no]) AC_MSG_RESULT($ignore_sigfpe) if test $ignore_sigfpe = yes; then AC_DEFINE(IGNORE_SIGFPE, [1], [Define to catch and ignore SIGFPE signals]) fi ############################################################################## # Miscellaneous function and header checks AC_HEADER_TIME AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_FUNCS([BSDgettimeofday gettimeofday cblas_ddot cblas_daxpy jn]) ############################################################################## # check for restrict keyword in C++ AC_PREREQ(2.58) dnl for ac_c_restrict AC_C_RESTRICT # check for C99 _Pragma support, so that we can emit pragmas in macros AC_TRY_COMPILE([], [_Pragma("ivdep")], [], [AC_DEFINE([_Pragma],[],[define to nothing if C99 _Pragma is not supported])]) ############################################################################## AC_SUBST(MEEP_SUFFIX) program_transform_name="s,_,-,g;$program_transform_name" ############################################################################## AC_CONFIG_FILES([ Makefile meep-pkgconfig src/Makefile tests/Makefile examples/Makefile libctl/Makefile libctl/meep.scm ]) AC_OUTPUT meep-1.3/test-driver0000755000175400001440000000761112235234727011436 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2012-06-27.10; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-1.3/m4/0000755000175400001440000000000012315342533007625 500000000000000meep-1.3/m4/ax_check_compiler_flags.m40000644000175400001440000000316712315327026014631 00000000000000dnl @synopsis AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) dnl @summary check whether FLAGS are accepted by the compiler dnl @category Misc dnl dnl Check whether the given compiler FLAGS work with the current language's dnl compiler, or whether they give an error. (Warnings, however, are dnl ignored.) dnl dnl ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on dnl success/failure. dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_CHECK_COMPILER_FLAGS], [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes, AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes, eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS]) eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1) AC_MSG_RESULT($ax_check_compiler_flags) if test "x$ax_check_compiler_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ])dnl AX_CHECK_COMPILER_FLAGS meep-1.3/m4/pkg.m40000644000175400001440000000407012315326171010571 00000000000000dnl Macro from pkg-config: http://www.freedesktop.org/software/pkgconfig/ dnl dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) meep-1.3/m4/lt~obsolete.m40000644000000000000620000001375612235234705012355 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) meep-1.3/m4/acx_mpi.m40000644000175400001440000000707212315326720011435 00000000000000dnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl @summary figure out how to compile/link code with MPI dnl @category InstalledPackages dnl dnl This macro tries to find out how to compile programs that dnl use MPI (Message Passing Interface), a standard API for dnl parallel process communication (see http://www-unix.mcs.anl.gov/mpi/) dnl dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to dnl the name of the MPI compiler, depending upon the current language. dnl (This may just be $CC/$CXX/$F77, but is more often something like dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are dnl needed for linking MPI (e.g. -lmpi, if a special MPICC/MPICXX/MPIF77 dnl was not found). dnl dnl If you want to compile everything with MPI, you should set: dnl dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77" dnl LIBS="$MPILIBS $LIBS" dnl dnl NOTE: The above assumes that you will use $CC (or whatever) dnl for linking as well as for compiling. (This is the dnl default for automake and most Makefiles.) dnl dnl The user can force a particular library/compiler by setting the dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_MPI. dnl dnl @version 2005-09-02 dnl @license GPLWithACException dnl @author Steven G. Johnson AC_DEFUN([ACX_MPI], [ AC_PREREQ(2.50) dnl for AC_LANG_CASE AC_LANG_CASE([C], [ AC_REQUIRE([AC_PROG_CC]) AC_ARG_VAR(MPICC,[MPI C compiler command]) AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc cmpicc, $CC) acx_mpi_save_CC="$CC" CC="$MPICC" AC_SUBST(MPICC) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) AC_CHECK_PROGS(MPICXX, mpic++ mpiCC mpicxx mpCC hcp mpxlC mpxlC_r cmpic++, $CXX) acx_mpi_save_CXX="$CXX" CXX="$MPICXX" AC_SUBST(MPICXX) ], [Fortran 77], [ AC_REQUIRE([AC_PROG_F77]) AC_ARG_VAR(MPIF77,[MPI Fortran compiler command]) AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, $F77) acx_mpi_save_F77="$F77" F77="$MPIF77" AC_SUBST(MPIF77) ]) if test x = x"$MPILIBS"; then AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" " AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) fi dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the dnl latter uses $CPP, not $CC (which may be mpicc). AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi], [C++], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi]) AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"], [C++], [CXX="$acx_mpi_save_CXX"], [Fortran 77], [F77="$acx_mpi_save_F77"]) AC_SUBST(MPILIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then $2 : else ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) : fi ])dnl ACX_MPI meep-1.3/m4/ltsugar.m40000644000000000000620000001042412235234705011451 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) meep-1.3/m4/acx_blas.m40000644000175400001440000001167712315327323011577 00000000000000dnl @synopsis ACX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl @summary check for a fast BLAS linear-algebra library dnl @category InstalledPackages dnl dnl This macro looks for a library that implements the BLAS dnl linear-algebra interface (see http://www.netlib.org/blas/). dnl On success, it sets the BLAS_LIBS output variable to dnl hold the requisite library linkages. dnl dnl To link with BLAS, you should link with: dnl $BLAS_LIBS $LIBS $FLIBS dnl in that order. FLIBS is the output variable of the dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), dnl and is sometimes necessary in order to link with F77 libraries. dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf dnl manual), for the same reason. dnl dnl Many libraries are searched for, from ATLAS to CXML to ESSL. dnl The user may also use --with-blas= in order to use some dnl specific BLAS library . In order to link successfully, dnl however, be aware that you will probably need to use the same dnl Fortran compiler (which can be set via the F77 env. var.) as dnl was used to compile the BLAS library. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a BLAS dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_BLAS. dnl dnl This macro requires autoconf 2.50 or later. dnl dnl @version 2007-08-10 dnl @license GPLWithACException dnl @author Steven G. Johnson AC_DEFUN([ACX_BLAS], [ AC_PREREQ(2.50) AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) acx_blas_ok=no AC_ARG_WITH(blas, [AC_HELP_STRING([--with-blas=], [use BLAS library ])]) case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. AC_F77_FUNC(sgemm) AC_F77_FUNC(dgemm) acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS]) AC_TRY_LINK_FUNC($sgemm, [acx_blas_ok=yes], [BLAS_LIBS=""]) AC_MSG_RESULT($acx_blas_ok) LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes]) LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then AC_CHECK_LIB(atlas, ATL_xerbla, [AC_CHECK_LIB(f77blas, $sgemm, [AC_CHECK_LIB(cblas, cblas_dgemm, [acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas"], [], [-lf77blas -latlas])], [], [-latlas])]) fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [AC_CHECK_LIB(dgemm, $dgemm, [AC_CHECK_LIB(sgemm, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"], [], [-lblas])], [], [-lblas])]) fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then AC_CHECK_LIB(mkl, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lmkl"]) fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes;BLAS_LIBS="-framework vecLib"]) LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then AC_CHECK_LIB(cxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lcxml"]) fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then AC_CHECK_LIB(dxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-ldxml"]) fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC AC_CHECK_LIB(sunmath, acosp, [AC_CHECK_LIB(sunperf, $sgemm, [BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes],[],[-lsunmath])]) fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then AC_CHECK_LIB(scs, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lscs"]) fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then AC_CHECK_LIB(complib.sgimath, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"]) fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [AC_CHECK_LIB(essl, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas"], [], [-lblas $FLIBS])]) fi # Generic BLAS library? if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lblas"]) fi AC_SUBST(BLAS_LIBS) LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1]) : else acx_blas_ok=no $2 fi ])dnl ACX_BLAS meep-1.3/m4/acx_lapack.m40000644000175400001440000000610212315325673012102 00000000000000dnl @synopsis ACX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro looks for a library that implements the LAPACK dnl linear-algebra interface (see http://www.netlib.org/lapack/). dnl On success, it sets the LAPACK_LIBS output variable to dnl hold the requisite library linkages. dnl dnl To link with LAPACK, you should link with: dnl $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS dnl in that order. BLAS_LIBS is the output variable of the ACX_BLAS dnl macro, called automatically. FLIBS is the output variable of the dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), dnl and is sometimes necessary in order to link with F77 libraries. dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf dnl manual), for the same reason. dnl dnl The user may also use --with-lapack= in order to use some dnl specific LAPACK library . In order to link successfully, dnl however, be aware that you will probably need to use the same dnl Fortran compiler (which can be set via the F77 env. var.) as dnl was used to compile the LAPACK and BLAS libraries. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a LAPACK dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_LAPACK. dnl dnl @version $Id: acx_lapack.m4,v 1.3 2002/02/25 19:05:51 stevenj Exp $ dnl @author Steven G. Johnson AC_DEFUN([ACX_LAPACK], [ AC_REQUIRE([ACX_BLAS]) acx_lapack_ok=no AC_ARG_WITH(lapack, [AC_HELP_STRING([--with-lapack=], [use LAPACK library ])]) case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. AC_F77_FUNC(cheev) # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS]) AC_TRY_LINK_FUNC($cheev, [acx_lapack_ok=yes], [LAPACK_LIBS=""]) AC_MSG_RESULT($acx_lapack_ok) LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes]) LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" AC_CHECK_LIB($lapack, $cheev, [acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS]) LIBS="$save_LIBS" fi done AC_SUBST(LAPACK_LIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1]) : else acx_lapack_ok=no $2 fi ])dnl ACX_LAPACK meep-1.3/m4/libtool.m40000644000000000000620000105721612235234705011447 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS meep-1.3/m4/ax_gcc_x86_cpuid.m40000644000175400001440000000453112315327736013137 00000000000000dnl @synopsis AX_GCC_X86_CPUID(OP) dnl @summary run x86 cpuid instruction OP using gcc inline assembler dnl @category Misc dnl dnl On Pentium and later x86 processors, with gcc or a compiler that dnl has a compatible syntax for inline assembly instructions, run dnl a small program that executes the cpuid instruction with dnl input OP. This can be used to detect the CPU type. dnl dnl On output, the values of the eax, ebx, ecx, and edx registers dnl are stored as hexadecimal strings as "eax:ebx:ecx:edx" in dnl the cache variable ax_cv_gcc_x86_cpuid_OP. dnl dnl If the cpuid instruction fails (because you are running a cross-compiler, dnl or because you are not using gcc, or because you are on a processor dnl that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP is set dnl to the string "unknown". dnl dnl This macro mainly exists to be used in AX_GCC_ARCHFLAG. dnl dnl @version 2008-12-06 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_GCC_X86_CPUID], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown])]) AC_LANG_POP([C]) ]) meep-1.3/m4/ax_cxx_maxopt.m40000644000175400001440000001317312315330341012670 00000000000000dnl @synopsis AX_CXX_MAXOPT dnl @summary turn on optimization flags for the C++ compiler dnl @category C++ dnl dnl Try to turn on "good" C++ optimization flags for various compilers dnl and architectures, for some definition of "good". Modify as needed dnl based on your benchmarks. dnl dnl The user can override the flags by setting the CXXFLAGS environment dnl variable. The user can also specify --enable-portable-binary in dnl order to disable any optimization flags that might result in dnl a binary that only runs on the host architecture. dnl dnl Note also that the flags assume that ANSI C aliasing rules are dnl followed by the code (e.g. for gcc's -fstrict-aliasing), and that dnl floating-point computations can be re-ordered as needed. dnl dnl Requires macros: AX_CHECK_COMPILER_FLAGS, AX_COMPILER_VENDOR, dnl AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_CXX_MAXOPT], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C++]) AX_COMPILER_VENDOR AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])], acx_maxopt_portable=$enableval, acx_maxopt_portable=no) # Try to determine "good" native compiler flags if none specified via CXXFLAGS if test "$ac_test_CXXFLAGS" != "set"; then CXXFLAGS="" case $ax_cv_cxx_compiler_vendor in dec) CXXFLAGS="-w0 -O5 -tune host" # -ansi_alias -ansi_args -fp_reorder ? if test "x$acx_maxopt_portable" = xno; then CXXFLAGS="$CXXFLAGS -arch host" fi;; sun) CXXFLAGS="-native -fast -dalign" # -xO5 ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS -xarch=generic" fi;; hp) CXXFLAGS="+Oall +DSnative" # +Optrs_ansi ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS +DAportable" fi;; ibm) if test "x$acx_maxopt_portable" = xno; then xlc_opt="-qarch=auto -qtune=auto" else xlc_opt="-qtune=auto" fi AX_CHECK_COMPILER_FLAGS($xlc_opt, CXXFLAGS="-O3 -qansialias -w $xlc_opt", [CXXFLAGS="-O3 -qansialias -w" echo "******************************************************" echo "* You seem to have the IBM C compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CXXFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CXXFLAGS environment var. *" echo "* and re-run configure.) For more info, man xlC. *" echo "******************************************************"]) ;; intel) CXXFLAGS="-O3" # -ansi_alias ? if test "x$acx_maxopt_portable" = xno; then icc_archflag=unknown icc_flags="" # -xN etcetera are for older versions of icc: case $host_cpu in i686*|x86_64*) # icc accepts gcc assembly syntax, so these should work: AX_GCC_X86_CPUID(0) AX_GCC_X86_CPUID(1) case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";; *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";; *f??:*:*:*) icc_flags="-xN -xW -xK";; esac ;; esac ;; esac # newer icc versions should support -xHost icc_flags="-xHost $icc_flags" if test "x$icc_flags" != x; then for flag in $icc_flags; do AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break]) done fi AC_MSG_CHECKING([for icc architecture flag]) AC_MSG_RESULT($icc_archflag) if test "x$icc_archflag" != xunknown; then CXXFLAGS="$CXXFLAGS $icc_archflag" fi fi ;; gnu) # default optimization flags for g++ on all systems CXXFLAGS="-O3" # -malign-double for x86 systems AX_CHECK_COMPILER_FLAGS(-malign-double, CXXFLAGS="$CXXFLAGS -malign-double") AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing, CXXFLAGS="$CXXFLAGS -fstrict-aliasing") # note that we enable "unsafe" fp optimization with other compilers, too AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math") AX_GCC_ARCHFLAG($acx_maxopt_portable) ;; esac if test -z "$CXXFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CXXFLAGS for this system *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CXXFLAGS="-O3" fi AX_CHECK_COMPILER_FLAGS($CXXFLAGS, [], [ echo "" echo "********************************************************" echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "********************************************************" echo "" CXXFLAGS="" ]) fi AC_LANG_POP([C++]) ]) meep-1.3/m4/ax_gcc_archflag.m40000644000175400001440000001713312315327743013075 00000000000000dnl @synopsis AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE]) dnl @summary find target architecture name for gcc -march/-mtune flags dnl @category Misc dnl dnl This macro tries to guess the "native" arch corresponding to dnl the target architecture for use with gcc's -march=arch or -mtune=arch dnl flags. If found, the cache variable $ax_cv_gcc_archflag is set to this dnl flag and ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is dnl is set to "unknown" and ACTION-FAILURE is executed. The default dnl ACTION-SUCCESS is to add $ax_cv_gcc_archflag to the end of $CFLAGS. dnl dnl PORTABLE? should be either [yes] (default) or [no]. In the former case, dnl the flag is set to -mtune (or equivalent) so that the architecture dnl is only used for tuning, but the instruction set used is still dnl portable. In the latter case, the flag is set to -march (or equivalent) dnl so that architecture-specific instructions are enabled. dnl dnl The user can specify --with-gcc-arch= in order to override dnl the macro's choice of architecture, or --without-gcc-arch to dnl disable this. dnl dnl When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is dnl called unless the user specified --with-gcc-arch manually. dnl dnl Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID dnl dnl (The main emphasis here is on recent CPUs, on the principle that dnl doing high-performance computing on old hardware is uncommon.) dnl dnl @version 2008-10-29 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_GCC_ARCHFLAG], [AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=], [use architecture for gcc -march/-mtune, instead of guessing])], ax_gcc_arch=$withval, ax_gcc_arch=yes) AC_MSG_CHECKING([for gcc architecture flag]) AC_MSG_RESULT([]) AC_CACHE_VAL(ax_cv_gcc_archflag, [ ax_cv_gcc_archflag="unknown" if test "$GCC" = yes; then if test "x$ax_gcc_arch" = xyes; then ax_gcc_arch="" if test "$cross_compiling" = no; then case $host_cpu in i[[3456]]86*|x86_64*|amd64*) # use cpuid codes, in part from x86info-1.21 by D. Jones AX_GCC_X86_CPUID(0) AX_GCC_X86_CPUID(1) case $ax_cv_gcc_x86_cpuid_0 in *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; *5??:*:*:*) ax_gcc_arch=pentium ;; *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[[234]]:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[[78b]]?:*:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[[9d]]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; *6[[e]]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; # Core Duo *6f?:*:*:*) ax_gcc_arch="core2 native pentium-m pentium3 pentiumpro" ;; *6??:*:*:*) ax_gcc_arch="native pentiumpro" ;; *f3[[347]]:*:*:*|*f4[[1347]]:*:*:*) case $host_cpu in x86_64*|amd64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; *) ax_gcc_arch="prescott pentium4 pentiumpro" ;; esac ;; *f??:*:*:*) ax_gcc_arch="native pentium4 pentiumpro";; esac ;; *:68747541:*:*) # AMD case $ax_cv_gcc_x86_cpuid_1 in *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;; *5[[8c]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; *5[[9d]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; *60?:*:*:*) ax_gcc_arch=k7 ;; *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;; *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; *6[[68a]]?:*:*:*) AX_GCC_X86_CPUID(0x80000006) # L2 cache size case $ax_cv_gcc_x86_cpuid_0x80000006 in *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256 ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; *) ax_gcc_arch="athlon-4 athlon k7" ;; esac ;; *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; *f5?:*:*:*) ax_gcc_arch="opteron k8" ;; *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; *f??:*:*:*) ax_gcc_arch="native k8" ;; esac ;; *:746e6543:*:*) # IDT case $ax_cv_gcc_x86_cpuid_1 in *54?:*:*:*) ax_gcc_arch=winchip-c6 ;; *58?:*:*:*) ax_gcc_arch=winchip2 ;; *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;; *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; esac ;; esac if test x"$ax_gcc_arch" = x; then # fallback case $host_cpu in i586*) ax_gcc_arch="native pentium" ;; i686*) ax_gcc_arch="native pentiumpro" ;; x86_64*|amd64*) ax_gcc_arch="native" ;; esac fi ;; sparc*) AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/]) cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` case $cputype in *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;; *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;; *cypress*) ax_gcc_arch=cypress ;; esac ;; alphaev5) ax_gcc_arch=ev5 ;; alphaev56) ax_gcc_arch=ev56 ;; alphapca56) ax_gcc_arch="pca56 ev56" ;; alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; alphaev6) ax_gcc_arch=ev6 ;; alphaev67) ax_gcc_arch=ev67 ;; alphaev68) ax_gcc_arch="ev68 ev67" ;; alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; powerpc*) cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` case $cputype in *750*) ax_gcc_arch="750 G3" ;; *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;; *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;; *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;; *970*) ax_gcc_arch="970 G5 power4";; *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; 603ev|8240) ax_gcc_arch="$cputype 603e 603";; *Cell*) ax_gcc_arch="cellppu cell";; *) ax_gcc_arch="$cputype native" ;; esac ax_gcc_arch="$ax_gcc_arch powerpc" ;; esac fi # not cross-compiling fi # guess arch if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then for arch in $ax_gcc_arch; do if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code flags="-mtune=$arch" # -mcpu=$arch and m$arch generate nonportable code on every arch except # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. case $host_cpu in i*86|x86_64*|amd64*) flags="$flags -mcpu=$arch -m$arch";; esac else flags="-march=$arch -mcpu=$arch -m$arch" fi for flag in $flags; do AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break]) done test "x$ax_cv_gcc_archflag" = xunknown || break done fi fi # $GCC=yes ]) AC_MSG_CHECKING([for gcc architecture flag]) AC_MSG_RESULT($ax_cv_gcc_archflag) if test "x$ax_cv_gcc_archflag" = xunknown; then m4_default([$3],:) else m4_default([$2], [_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS $ax_cv_gcc_archflag"]) fi ]) meep-1.3/m4/ltoptions.m40000644000000000000620000003007312235234705012025 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) meep-1.3/m4/ax_compiler_vendor.m40000644000175400001440000000265712315327026013700 00000000000000dnl @synopsis AX_COMPILER_VENDOR dnl @summary find the vendor (gnu, intel, etc.) of the C/C++ compiler dnl @category C dnl @category C++ dnl dnl Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, dnl sun, hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, dnl microsoft, watcom, etc. The vendor is returned in the cache variable dnl $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson with Matteo Frigo AC_DEFUN([AX_COMPILER_VENDOR], [ AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ 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__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ #if !($vencpp) thisisanerror; #endif ])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break]) done ]) ]) meep-1.3/m4/ltversion.m40000644000000000000620000000126212235234705012015 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) meep-1.3/config.sub0000755000175400001440000010530112235234727011216 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-04-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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 to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: meep-1.3/examples/0000755000175400001440000000000012506541114011121 500000000000000meep-1.3/examples/Makefile.am0000644000175400001440000000020412315327104013070 00000000000000EXTRA_DIST = 3rd-harm-1d.ctl bend-flux.ctl holey-wvg-bands.ctl \ holey-wvg-cavity.ctl ring.ctl ring-cyl.ctl material-dispersion.ctl meep-1.3/examples/ring.ctl0000644000175400001440000000353312315330174012510 00000000000000; Calculating 2d ring-resonator modes, from the Meep tutorial. (define-param n 3.4) ; index of waveguide (define-param w 1) ; width of waveguide (define-param r 1) ; inner radius of ring (define-param pad 4) ; padding between waveguide and edge of PML (define-param dpml 2) ; thickness of PML (define sxy (* 2 (+ r w pad dpml))) ; cell size (set! geometry-lattice (make lattice (size sxy sxy no-size))) ; Create a ring waveguide by two overlapping cylinders - later objects ; take precedence over earlier objects, so we put the outer cylinder first. ; and the inner (air) cylinder second. (set! geometry (list (make cylinder (center 0 0) (height infinity) (radius (+ r w)) (material (make dielectric (index n)))) (make cylinder (center 0 0) (height infinity) (radius r) (material air)))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 10) ; If we don't want to excite a specific mode symmetry, we can just ; put a single point source at some arbitrary place, pointing in some ; arbitrary direction. We will only look for TM modes (E out of the plane). (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ r 0.1) 0)))) ; exploit the mirror symmetry in structure+source: (set! symmetries (list (make mirror-sym (direction Y)))) (run-sources+ 300 (at-beginning output-epsilon) (after-sources (harminv Ez (vector3 (+ r 0.1)) fcen df))) ; Output fields for one period at the end. (If we output ; at a single time, we might accidentally catch the Ez field when it is ; almost zero and get a distorted view.) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-efield-z)) meep-1.3/examples/holey-wvg-cavity.ctl0000644000175400001440000000633312315327016014771 00000000000000; Meep Tutorial: TE transmission and reflection through a cavity ; formed by a periodic sequence of holes in a dielectric waveguide, ; with a defect formed by a larger spacing between one pair of holes. ; This structure is based on one analyzed in: ; S. Fan, J. N. Winn, A. Devenyi, J. C. Chen, R. D. Meade, and ; J. D. Joannopoulos, "Guided and defect modes in periodic dielectric ; waveguides," J. Opt. Soc. Am. B, 12 (7), 1267-1272 (1995). ; Some parameters to describe the geometry: (define-param eps 13) ; dielectric constant of waveguide (define-param w 1.2) ; width of waveguide (define-param r 0.36) ; radius of holes (define-param d 1.4) ; defect spacing (ordinary spacing = 1) (define-param N 3) ; number of holes on either side of defect ; The cell dimensions (define-param sy 6) ; size of cell in y direction (perpendicular to wvg.) (define-param pad 2) ; padding between last hole and PML edge (define-param dpml 1) ; PML thickness (define sx (+ (* 2 (+ pad dpml N)) d -1)) ; size of cell in x direction (set! geometry-lattice (make lattice (size sx sy no-size))) (set! geometry (append ; combine lists of objects: (list (make block (center 0 0) (size infinity w infinity) (material (make dielectric (epsilon eps))))) (geometric-object-duplicates (vector3 1 0) 0 (- N 1) (make cylinder (center (/ d 2) 0) (radius r) (height infinity) (material air))) (geometric-object-duplicates (vector3 -1 0) 0 (- N 1) (make cylinder (center (/ d -2) 0) (radius r) (height infinity) (material air))))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 20) (define-param fcen 0.25) ; pulse center frequency (define-param df 0.2) ; pulse width (in frequency) (define-param nfreq 500) ; number of frequencies at which to compute flux ; false = transmission spectrum, true = resonant modes: (define-param compute-mode? false) (if compute-mode? (begin (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Hz) (center 0 0)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)) (make mirror-sym (direction X) (phase -1)))) (run-sources+ 400 (at-beginning output-epsilon) (after-sources (harminv Hz (vector3 0) fcen df))) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-hfield-z)) ) (begin (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center (+ dpml (* -0.5 sx)) 0) (size 0 w)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)))) (define trans ; transmitted flux (add-flux fcen df nfreq (make flux-region (center (- (* 0.5 sx) dpml 0.5) 0) (size 0 (* w 2))))) (run-sources+ (stop-when-fields-decayed 50 Ey (vector3 (- (* 0.5 sx) dpml 0.5) 0) 1e-3) (at-beginning output-epsilon) (during-sources (in-volume (volume (center 0 0) (size sx 0)) (to-appended "hz-slice" (at-every 0.4 output-hfield-z))))) (display-fluxes trans) ; print out the flux spectrum )) meep-1.3/examples/holey-wvg-bands.ctl0000644000175400001440000000370112315327017014556 00000000000000; Meep Tutorial: TE transmission and reflection through a cavity ; formed by a periodic sequence of holes in a dielectric waveguide, ; with a defect formed by a larger spacing between one pair of holes. ; This structure is based on one analyzed in: ; S. Fan, J. N. Winn, A. Devenyi, J. C. Chen, R. D. Meade, and ; J. D. Joannopoulos, "Guided and defect modes in periodic dielectric ; waveguides," J. Opt. Soc. Am. B, 12 (7), 1267-1272 (1995). ; Some parameters to describe the geometry: (define-param eps 13) ; dielectric constant of waveguide (define-param w 1.2) ; width of waveguide (define-param r 0.36) ; radius of holes ; The cell dimensions (define-param sy 12) ; size of cell in y direction (perpendicular to wvg.) (define-param dpml 1) ; PML thickness (y direction only!) (set! geometry-lattice (make lattice (size 1 sy no-size))) (set! geometry (list (make block (center 0 0) (size infinity w infinity) (material (make dielectric (epsilon eps)))) (make cylinder (center 0 0) (radius r) (height infinity) (material air)))) (set! pml-layers (list (make pml (direction Y) (thickness dpml)))) (set-param! resolution 20) (define-param fcen 0.25) ; pulse center frequency (define-param df 1.5) ; pulse freq. width: large df = short impulse (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Hz) (center 0.1234 0)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)))) (define-param kx false) ; if true, do run at specified kx and get fields (define-param k-interp 19) ; # k-points to interpolate, otherwise (if kx (begin (set! k-point (vector3 kx)) (run-sources+ 300 (at-beginning output-epsilon) (after-sources (harminv Hz (vector3 0.1234 0) fcen df))) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-hfield-z))) (run-k-points 300 (interpolate k-interp (list (vector3 0) (vector3 0.5))))) meep-1.3/examples/3rd-harm-1d.ctl0000644000175400001440000000375012315327050013470 00000000000000; 1d simulation of a plane wave propagating through a Kerr medium ; and generating the third-harmonic frequency component. (define-param sz 100) ; size of cell in z direction (define-param fcen (/ 1 3)) ; center frequency of source (define-param df (/ fcen 20)) ; frequency width of source (define-param amp 1.0) ; amplitude of source (define-param k 1e-2) ; Kerr susceptibility (define-param dpml 1.0) ; PML layer thickness ; We'll use an explicitly 1d simulation. Setting dimensions=1 will actually ; result in faster execution than just using two no-size dimensions. However, ; in this case Meep requires us to use E in the x direction (and H in y), ; and our one no-size dimension must be z. (set-param! dimensions 1) (set! geometry-lattice (make lattice (size no-size no-size sz))) ; to put the same material in all space, we can just set the default material (set! default-material (make dielectric (index 1) (chi3 k))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 20) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ex) (center 0 0 (+ (* -0.5 sz) dpml)) (amplitude amp)))) ; frequency range for flux calculation (define-param nfreq 400) (define-param fmin (/ fcen 2)) (define-param fmax (* fcen 4)) (define trans ; transmitted flux (add-flux (* 0.5 (+ fmin fmax)) (- fmax fmin) nfreq (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) ; also compute a ''single'' flux point at fcen and 3*fcen (define trans1 (add-flux fcen 0 1 (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) (define trans3 (add-flux (* 3 fcen) 0 1 (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) (run-sources+ (stop-when-fields-decayed 50 Ex (vector3 0 0 (- (* 0.5 sz) dpml 0.5)) 1e-6)) (display-fluxes trans) (print "harmonics:, " k ", " amp ", " (first (get-fluxes trans1)) ", " (first (get-fluxes trans3)) "\n") meep-1.3/examples/bend-flux.ctl0000644000175400001440000000443012315327013013430 00000000000000; From the Meep tutorial: transmission around a 90-degree waveguide ; bend in 2d. (define-param sx 16) ; size of cell in X direction (define-param sy 32) ; size of cell in Y direction (set! geometry-lattice (make lattice (size sx sy no-size))) (define-param pad 4) ; padding distance between waveguide and cell edge (define-param w 1) ; width of waveguide (define wvg-ycen (* -0.5 (- sy w (* 2 pad)))) ; y center of horiz. wvg (define wvg-xcen (* 0.5 (- sx w (* 2 pad)))) ; x center of vert. wvg (define-param no-bend? false) ; if true, have straight waveguide, not bend (set! geometry (if no-bend? (list (make block (center 0 wvg-ycen) (size infinity w infinity) (material (make dielectric (epsilon 12))))) (list (make block (center (* -0.5 pad) wvg-ycen) (size (- sx pad) w infinity) (material (make dielectric (epsilon 12)))) (make block (center wvg-xcen (* 0.5 pad)) (size w (- sy pad) infinity) (material (make dielectric (epsilon 12))))))) (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ 1 (* -0.5 sx)) wvg-ycen) (size 0 w)))) (set! pml-layers (list (make pml (thickness 1.0)))) (set-param! resolution 10) (define-param nfreq 100) ; number of frequencies at which to compute flux (define trans ; transmitted flux (add-flux fcen df nfreq (if no-bend? (make flux-region (center (- (/ sx 2) 1.5) wvg-ycen) (size 0 (* w 2))) (make flux-region (center wvg-xcen (- (/ sy 2) 1.5)) (size (* w 2) 0))))) (define refl ; reflected flux (add-flux fcen df nfreq (make flux-region (center (+ (* -0.5 sx) 1.5) wvg-ycen) (size 0 (* w 2))))) ; for normal run, load negated fields to subtract incident from refl. fields (if (not no-bend?) (load-minus-flux "refl-flux" refl)) (run-sources+ (stop-when-fields-decayed 50 Ez (if no-bend? (vector3 (- (/ sx 2) 1.5) wvg-ycen) (vector3 wvg-xcen (- (/ sy 2) 1.5))) 1e-3) (at-beginning output-epsilon)) ; for normalization run, save flux fields for refl. plane (if no-bend? (save-flux "refl-flux" refl)) (display-fluxes trans refl) meep-1.3/examples/Makefile.in0000644000175400001440000003120112506540651013110 00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MPIRUN = @MPIRUN@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = 3rd-harm-1d.ctl bend-flux.ctl holey-wvg-bands.ctl \ holey-wvg-cavity.ctl ring.ctl ring-cyl.ctl material-dispersion.ctl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-1.3/examples/ring-cyl.ctl0000644000175400001440000000373212315327061013277 00000000000000; Calculating 2d ring-resonator modes using cylindrical coordinates, ; from the Meep tutorial. (define-param n 3.4) ; index of waveguide (define-param w 1) ; width of waveguide (define-param r 1) ; inner radius of ring (define-param pad 4) ; padding between waveguide and edge of PML (define-param dpml 2) ; thickness of PML (define sr (+ r w pad dpml)) ; radial size (cell is from 0 to sr) (set! dimensions CYLINDRICAL) (set! geometry-lattice (make lattice (size sr no-size no-size))) ; in cylindrical coordinates, the phi (angular) dependence of the fields ; is given by exp(i m phi), where m is given by: (set-param! m 3) (set! geometry (list (make block (center (+ r (/ w 2))) (size w infinity infinity) (material (make dielectric (index n)))))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 10) ; If we don't want to excite a specific mode symmetry, we can just ; put a single point source at some arbitrary place, pointing in some ; arbitrary direction. We will only look for TM modes (E out of the plane). (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ r 0.1) 0)))) ; note that the r -> -r mirror symmetry is exploited automatically (run-sources+ 200 (after-sources (harminv Ez (vector3 (+ r 0.1)) fcen df))) ; Output fields for one period at the end. (If we output ; at a single time, we might accidentally catch the Ez field when it is ; almost zero and get a distorted view.) We'll append the fields ; to a file to get an r-by-t picture. We'll also output from -sr to -sr ; instead of from 0 to sr. (run-until (/ 1 fcen) (in-volume (volume (center 0) (size (* 2 sr))) (at-beginning output-epsilon) (to-appended "ez" (at-every (/ 1 fcen 20) output-efield-z)))) meep-1.3/examples/material-dispersion.ctl0000644000175400001440000000301512315327767015535 00000000000000; Material dispersion example, from the Meep tutorial. Here, we simply ; simulate homogenous space filled with a dispersive material, and compute ; its modes as a function of wavevector k. Since omega/c = k/n, we can ; extract the dielectric function epsilon(omega) = (ck/omega)^2. (set! geometry-lattice (make lattice (size no-size no-size no-size))) (set-param! resolution 20) ; We'll use a dispersive material with two polarization terms, just for ; illustration. The first one is a strong resonance at omega=1.1, ; which leads to a polaritonic gap in the dispersion relation. The second ; one is a weak resonance at omega=0.5, whose main effect is to add a ; small absorption loss around that frequency. (set! default-material (make dielectric (epsilon 2.25) (polarizations (make polarizability (omega 1.1) (gamma 1e-5) (sigma 0.5)) (make polarizability (omega 0.5) (gamma 0.1) (sigma 2e-5)) ))) (define-param fcen 1.0) (define-param df 2.0) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center 0 0 0)))) (define-param kmin 0.3) (define-param kmax 2.2) (define-param k-interp 99) (define kpts (interpolate k-interp (list (vector3 kmin) (vector3 kmax)))) (define all-freqs (run-k-points 200 kpts)) ; a list of lists of frequencies (map (lambda (kx fs) (map (lambda (f) (print "eps:, " (real-part f) ", " (imag-part f) ", " (sqr (/ kx f)) "\n")) fs)) (map vector3-x kpts) all-freqs) meep-1.3/config.guess0000755000175400001440000013036112235234727011557 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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 to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: meep-1.3/compile0000755000175400001440000001624512235234727010621 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-1.3/config.h.in0000644000175400001440000001356312506540664011267 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* define to enable debugging code */ #undef DEBUG /* Define to dummy `main' function (if any) required to link to the Fortran libraries. */ #undef F77_DUMMY_MAIN /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ #undef F77_FUNC /* As F77_FUNC, but for C identifiers containing underscores. */ #undef F77_FUNC_ /* Define if F77 and FC dummy `main' functions are identical. */ #undef FC_DUMMY_MAIN_EQ_F77 /* Define if you have a BLAS library. */ #undef HAVE_BLAS /* Define to 1 if you have the `BSDgettimeofday' function. */ #undef HAVE_BSDGETTIMEOFDAY /* Define to 1 if you have the `cblas_daxpy' function. */ #undef HAVE_CBLAS_DAXPY /* Define to 1 if you have the `cblas_ddot' function. */ #undef HAVE_CBLAS_DDOT /* Define if fenv.h declares this. */ #undef HAVE_DECL_FEENABLEEXCEPT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `feenableexcept' function. */ #undef HAVE_FEENABLEEXCEPT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_GUILE_GH_H /* Define to 1 if you have the `H5Pset_fapl_mpio' function. */ #undef HAVE_H5PSET_FAPL_MPIO /* Define to 1 if you have the `H5Pset_mpi' function. */ #undef HAVE_H5PSET_MPI /* Define if you have libharminv */ #undef HAVE_HARMINV /* Define if we have & link HDF5 */ #undef HAVE_HDF5 /* Define to 1 if you have the header file. */ #undef HAVE_HDF5_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `jn' function. */ #undef HAVE_JN /* Define if you have LAPACK library. */ #undef HAVE_LAPACK /* Define to 1 if you have the `ctl' library (-lctl). */ #undef HAVE_LIBCTL /* If we have the libctl_quiet variable */ #undef HAVE_LIBCTL_QUIET /* Define to 1 if you have the `dfftw' library (-ldfftw). */ #undef HAVE_LIBDFFTW /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `fftw' library (-lfftw). */ #undef HAVE_LIBFFTW /* Define to 1 if you have the `fftw3' library (-lfftw3). */ #undef HAVE_LIBFFTW3 /* Define to 1 if you have the `gen' library (-lgen). */ #undef HAVE_LIBGEN /* Define to 1 if you have the `gsl' library (-lgsl). */ #undef HAVE_LIBGSL /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `guile' library (-lguile). */ #undef HAVE_LIBGUILE /* Define to 1 if you have the header file. */ #undef HAVE_LIBGUILE_H /* Define to 1 if you have the `guile-ltdl' library (-lguile-ltdl). */ #undef HAVE_LIBGUILE_LTDL /* Define to 1 if you have the `ltdl' library (-lltdl). */ #undef HAVE_LIBLTDL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `readline' library (-lreadline). */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if you have libmpb */ #undef HAVE_MPB /* Define if you have the MPI library. */ #undef HAVE_MPI /* Define to 1 if you have the `scm_make_smob_type' function. */ #undef HAVE_SCM_MAKE_SMOB_TYPE /* define if we have SCM_NEWSMOB */ #undef HAVE_SCM_NEWSMOB /* define if we have SCM_SMOB_DATA */ #undef HAVE_SCM_SMOB_DATA /* define if we have SCM_SMOB_PREDICATE */ #undef HAVE_SCM_SMOB_PREDICATE /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to catch and ignore SIGFPE signals */ #undef IGNORE_SIGFPE /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if mpi.h needs SEEK macros to be undefined */ #undef NEED_UNDEF_SEEK_FOR_MPI /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* define to nothing if C99 _Pragma is not supported */ #undef _Pragma /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif