Skip to content

Commit 4f997d9

Browse files
committedOct 28, 2021
Update to AST version 9.2.5
1 parent 129f073 commit 4f997d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+8680
-3182
lines changed
 

‎ast/Makefile.am

+66-16
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ CMINPACK_FILES = \
585585
bin_SCRIPTS = ast_link
586586
dist_bin_SCRIPTS = ast_link_adam
587587
noinst_SCRIPTS = ast_cpp
588-
dist_noinst_SCRIPTS = makeh
588+
dist_noinst_SCRIPTS = $(srcdir)/makeh
589589
# Scripts are not distributed by default (since they might be derived objects)
590590
# Add these to the distribution below. In fact, it would be useful
591591
# and straightforward to make ast_link{,_adam} derived, since they
@@ -596,18 +596,33 @@ dist_noinst_SCRIPTS = makeh
596596
# Headers required by library users. Both of the following lines
597597
# indicate headers which are installed.
598598
cincludedir = $(includedir)/star
599+
if !NOFORTRAN
599600
cinclude_HEADERS = GRF_PAR src/grf.h src/grf3d.h
601+
else
602+
cinclude_HEADERS = src/grf.h src/grf3d.h
603+
endif
604+
600605
# Following are generated, so should not be distributed.
601-
nodist_cinclude_HEADERS = ast.h AST_PAR
606+
if !NOFORTRAN
602607
include_MESSAGES = AST_ERR ast_err.h
608+
nodist_cinclude_HEADERS = ast.h AST_PAR
609+
else
610+
include_MESSAGES = ast_err.h
611+
nodist_cinclude_HEADERS = ast.h
612+
endif
603613

604614
# Also install headers in main include directory for the benefit of
605615
# legacy code that does '#include "ast.h"' instead of '#include
606616
# "star/ast.h"'. Note, currently _MESSAGES files must be installed in
607617
# the main include directory.
608618
if TOPINCLUDE
619+
if !NOFORTRAN
609620
include_HEADERS = GRF_PAR src/grf.h src/grf3d.h
610621
nodist_include_HEADERS = ast.h AST_PAR
622+
else
623+
include_HEADERS = src/grf.h src/grf3d.h
624+
nodist_include_HEADERS = ast.h
625+
endif
611626
endif
612627

613628
if EXTERNAL_PAL
@@ -616,8 +631,15 @@ else
616631
PAL_LIB = libast_pal.la
617632
endif
618633

634+
if EXTERNAL_CMINPACK
635+
CMINPACK_LIB =
636+
else
637+
CMINPACK_LIB = libast_cminpack.la
638+
endif
639+
619640
lib_LTLIBRARIES = \
620641
$(PAL_LIB) \
642+
$(CMINPACK_LIB) \
621643
libast.la \
622644
libast_err.la \
623645
libast_ems.la \
@@ -667,6 +689,7 @@ libast_grf_5_6_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
667689
libast_pgplot_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
668690
libast_pgplot3d_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
669691
libast_pal_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
692+
libast_cminpack_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
670693
endif
671694

672695
# The module containing the main AST classes
@@ -676,26 +699,39 @@ libast_la_SOURCES = \
676699
$(GRP_C_INCLUDE_FILES) \
677700
$(F_C_INCLUDE_FILES) \
678701
$(GRP_F_INCLUDE_FILES) \
679-
$(CMINPACK_FILES) \
680702
$(WCSLIB_FILES) \
681703
ast_err.h
682704
libast_la_LDFLAGS = -version-info @version_info@
683705

684706
# Ensure libast links against libraries containing functions used within
685707
# libast. If AST is configured --with-external-pal, then the internal
686708
# libast_pal library will be empty, and we link to an external PAL
687-
# library instead.
709+
# library instead. Do the same for cminpack
688710
if EXTERNAL_PAL
689-
libast_la_LIBADD = $(libdir)/libpal.la
711+
if EXTERNAL_CMINPACK
712+
libast_la_LIBADD = $(libdir)/libpal.la -lcminpack
690713
else
691-
libast_la_LIBADD = libast_pal.la
714+
libast_la_LIBADD = $(libdir)/libpal.la libast_cminpack.la
692715
endif
716+
else
717+
if EXTERNAL_CMINPACK
718+
libast_la_LIBADD = libast_pal.la -lcminpack
719+
else
720+
libast_la_LIBADD = libast_pal.la libast_cminpack.la
721+
endif
722+
endif
723+
724+
693725

694726
# AST_PAR is really part of GRP_F_INCLUDE_FILES, but it must not be
695727
# distributed, so list it separately.
728+
if !NOFORTRAN
696729
nodist_libast_la_SOURCES = \
697730
ast.h \
698731
AST_PAR
732+
else
733+
nodist_libast_la_SOURCES = ast.h
734+
endif
699735

700736
# The default error reporting module.
701737
libast_err_la_SOURCES = src/err_null.c
@@ -741,10 +777,18 @@ libast_pgplot3d_la_LDFLAGS = -version-info @version_info@
741777
libast_pal_la_SOURCES = $(PAL_FILES)
742778
libast_pal_la_LDFLAGS = -version-info @version_info@
743779

780+
# Cminpack
781+
libast_cminpack_la_SOURCES = $(CMINPACK_FILES)
782+
libast_cminpack_la_LDFLAGS = -version-info @version_info@
783+
744784
# The following files are built by the targets in this makefile.
745785
MAINTAINERCLEANFILES = src/version.h builddocs addversion \
746786
ast.h $(DOCUMENTATION_PRODUCTS)
787+
if !NOFORTRAN
747788
CLEANFILES = AST_PAR ast.h
789+
else
790+
CLEANFILES = ast.h
791+
endif
748792

749793
# Special cases start here
750794

@@ -753,27 +797,29 @@ CLEANFILES = AST_PAR ast.h
753797
# also changing the "E" exponent character to a "D"). The astbad.c
754798
# and ast_par.source must be distributed (the generation of the
755799
# AST__BAD value must be done on the build host) but not installed.
756-
noinst_PROGRAMS = astbad
800+
if !NOFORTRAN
801+
noinst_PROGRAMS = astbad$(EXEEXT)
757802
astbad_SOURCES = src/astbad.c src/pointset.h
758-
AST_PAR: ast_par.source astbad
759-
sed -e 's/<AST__BAD>/'`./astbad AST__BAD | tr 'E' 'D'`'/' \
760-
-e 's/<AST__NAN>/'`./astbad AST__NAN | tr 'E' 'D'`'/' \
761-
-e 's/<AST__NANR>/'`./astbad AST__NANF | tr 'E' 'D'`'/' \
762-
ast_par.source >$@
803+
AST_PAR: $(srcdir)/ast_par.source astbad$(EXEEXT)
804+
sed -e 's/<AST__BAD>/'`./astbad$(EXEEXT) AST__BAD | tr 'E' 'D'`'/' \
805+
-e 's/<AST__NAN>/'`./astbad$(EXEEXT) AST__NAN | tr 'E' 'D'`'/' \
806+
-e 's/<AST__NANR>/'`./astbad$(EXEEXT) AST__NANF | tr 'E' 'D'`'/' \
807+
$(srcdir)/ast_par.source >$@
808+
endif
763809

764810
# ast_link is generated from ast_link.in; ast_link_adam does not
765811
# need configuration, and so is not mentioned in AC_CONFIG_FILES within
766812
# configure.ac, and so is not distributed automatically.
767813
#
768814
# makeh is required in order to build ast.h after distribution (see below).
769-
EXTRA_DIST = ast_par.source sun210_figures sun211_figures pal erfa cminpack
815+
EXTRA_DIST = $(srcdir)/ast_par.source sun210_figures sun211_figures pal erfa cminpack
770816

771817
# ast.h depends on the error-facility files. ast.h _could_ be made
772818
# before distribution, but since it's generated from other distributed
773819
# files, it's more robust to distribute makeh and make ast.h on the
774820
# build host.
775-
ast.h: $(AST_H_FILES) ast_err.h makeh config.h
776-
@PERL@ ./makeh -s $(srcdir) $(AST_H_FILES) >$@
821+
ast.h: $(AST_H_FILES) ast_err.h $(srcdir)/makeh config.h
822+
@PERL@ $(srcdir)/makeh -s $(srcdir) $(AST_H_FILES) >$@
777823

778824
# AST_ERR and ast_err.h are `generated source files', and so must be
779825
# generated before any other compilations are done. Note that these
@@ -788,7 +834,11 @@ ast.h: $(AST_H_FILES) ast_err.h makeh config.h
788834
#
789835
# version.h is included by object.h, and thus indirectly by most modules.
790836
# It's most straightforward to build it at the beginning.
837+
if !NOFORTRAN
791838
BUILT_SOURCES = AST_ERR ast_err.h src/version.h
839+
else
840+
BUILT_SOURCES = ast_err.h src/version.h
841+
endif
792842

793843
# Form a second link to the main object library (static and shared). This
794844
# is used when a second pass through the library is needed during linking
@@ -852,7 +902,7 @@ test: install
852902

853903
#ast_test_LDADD = `ast_link`
854904
# Expand ast_link to avoid libast_pass2, which causes problems for Solaris
855-
ast_test_LDADD = @LIBPAL@ libast.la libast_pal.la libast_grf_3.2.la libast_grf_5.6.la libast_grf_2.0.la libast_grf3d.la libast_err.la -lm
905+
ast_test_LDADD = @LIBPAL@ @LIBCMINPACK@ libast.la libast_pal.la libast_cminpack.la libast_grf_3.2.la libast_grf_5.6.la libast_grf_2.0.la libast_grf3d.la libast_err.la -lm
856906

857907
# Need to include latex support files in the distribution tar ball so
858908
# that the docs can be built from the tex source files. Requires environment

0 commit comments

Comments
 (0)
Please sign in to comment.