@@ -585,7 +585,7 @@ CMINPACK_FILES = \
585
585
bin_SCRIPTS = ast_link
586
586
dist_bin_SCRIPTS = ast_link_adam
587
587
noinst_SCRIPTS = ast_cpp
588
- dist_noinst_SCRIPTS = makeh
588
+ dist_noinst_SCRIPTS = $( srcdir ) / makeh
589
589
# Scripts are not distributed by default (since they might be derived objects)
590
590
# Add these to the distribution below. In fact, it would be useful
591
591
# and straightforward to make ast_link{,_adam} derived, since they
@@ -596,18 +596,33 @@ dist_noinst_SCRIPTS = makeh
596
596
# Headers required by library users. Both of the following lines
597
597
# indicate headers which are installed.
598
598
cincludedir = $(includedir ) /star
599
+ if !NOFORTRAN
599
600
cinclude_HEADERS = GRF_PAR src/grf.h src/grf3d.h
601
+ else
602
+ cinclude_HEADERS = src/grf.h src/grf3d.h
603
+ endif
604
+
600
605
# Following are generated, so should not be distributed.
601
- nodist_cinclude_HEADERS = ast.h AST_PAR
606
+ if !NOFORTRAN
602
607
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
603
613
604
614
# Also install headers in main include directory for the benefit of
605
615
# legacy code that does '#include "ast.h"' instead of '#include
606
616
# "star/ast.h"'. Note, currently _MESSAGES files must be installed in
607
617
# the main include directory.
608
618
if TOPINCLUDE
619
+ if !NOFORTRAN
609
620
include_HEADERS = GRF_PAR src/grf.h src/grf3d.h
610
621
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
611
626
endif
612
627
613
628
if EXTERNAL_PAL
@@ -616,8 +631,15 @@ else
616
631
PAL_LIB = libast_pal.la
617
632
endif
618
633
634
+ if EXTERNAL_CMINPACK
635
+ CMINPACK_LIB =
636
+ else
637
+ CMINPACK_LIB = libast_cminpack.la
638
+ endif
639
+
619
640
lib_LTLIBRARIES = \
620
641
$(PAL_LIB ) \
642
+ $(CMINPACK_LIB ) \
621
643
libast.la \
622
644
libast_err.la \
623
645
libast_ems.la \
@@ -667,6 +689,7 @@ libast_grf_5_6_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
667
689
libast_pgplot_la_CFLAGS = $(AM_CFLAGS ) -prefer-pic
668
690
libast_pgplot3d_la_CFLAGS = $(AM_CFLAGS ) -prefer-pic
669
691
libast_pal_la_CFLAGS = $(AM_CFLAGS ) -prefer-pic
692
+ libast_cminpack_la_CFLAGS = $(AM_CFLAGS ) -prefer-pic
670
693
endif
671
694
672
695
# The module containing the main AST classes
@@ -676,26 +699,39 @@ libast_la_SOURCES = \
676
699
$(GRP_C_INCLUDE_FILES ) \
677
700
$(F_C_INCLUDE_FILES ) \
678
701
$(GRP_F_INCLUDE_FILES ) \
679
- $(CMINPACK_FILES ) \
680
702
$(WCSLIB_FILES ) \
681
703
ast_err.h
682
704
libast_la_LDFLAGS = -version-info @version_info@
683
705
684
706
# Ensure libast links against libraries containing functions used within
685
707
# libast. If AST is configured --with-external-pal, then the internal
686
708
# libast_pal library will be empty, and we link to an external PAL
687
- # library instead.
709
+ # library instead. Do the same for cminpack
688
710
if EXTERNAL_PAL
689
- libast_la_LIBADD = $(libdir ) /libpal.la
711
+ if EXTERNAL_CMINPACK
712
+ libast_la_LIBADD = $(libdir ) /libpal.la -lcminpack
690
713
else
691
- libast_la_LIBADD = libast_pal .la
714
+ libast_la_LIBADD = $( libdir ) /libpal.la libast_cminpack .la
692
715
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
+
693
725
694
726
# AST_PAR is really part of GRP_F_INCLUDE_FILES, but it must not be
695
727
# distributed, so list it separately.
728
+ if !NOFORTRAN
696
729
nodist_libast_la_SOURCES = \
697
730
ast.h \
698
731
AST_PAR
732
+ else
733
+ nodist_libast_la_SOURCES = ast.h
734
+ endif
699
735
700
736
# The default error reporting module.
701
737
libast_err_la_SOURCES = src/err_null.c
@@ -741,10 +777,18 @@ libast_pgplot3d_la_LDFLAGS = -version-info @version_info@
741
777
libast_pal_la_SOURCES = $(PAL_FILES )
742
778
libast_pal_la_LDFLAGS = -version-info @version_info@
743
779
780
+ # Cminpack
781
+ libast_cminpack_la_SOURCES = $(CMINPACK_FILES )
782
+ libast_cminpack_la_LDFLAGS = -version-info @version_info@
783
+
744
784
# The following files are built by the targets in this makefile.
745
785
MAINTAINERCLEANFILES = src/version.h builddocs addversion \
746
786
ast.h $(DOCUMENTATION_PRODUCTS )
787
+ if !NOFORTRAN
747
788
CLEANFILES = AST_PAR ast.h
789
+ else
790
+ CLEANFILES = ast.h
791
+ endif
748
792
749
793
# Special cases start here
750
794
@@ -753,27 +797,29 @@ CLEANFILES = AST_PAR ast.h
753
797
# also changing the "E" exponent character to a "D"). The astbad.c
754
798
# and ast_par.source must be distributed (the generation of the
755
799
# 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 )
757
802
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
763
809
764
810
# ast_link is generated from ast_link.in; ast_link_adam does not
765
811
# need configuration, and so is not mentioned in AC_CONFIG_FILES within
766
812
# configure.ac, and so is not distributed automatically.
767
813
#
768
814
# 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
770
816
771
817
# ast.h depends on the error-facility files. ast.h _could_ be made
772
818
# before distribution, but since it's generated from other distributed
773
819
# files, it's more robust to distribute makeh and make ast.h on the
774
820
# 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 ) > $@
777
823
778
824
# AST_ERR and ast_err.h are `generated source files', and so must be
779
825
# 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
788
834
#
789
835
# version.h is included by object.h, and thus indirectly by most modules.
790
836
# It's most straightforward to build it at the beginning.
837
+ if !NOFORTRAN
791
838
BUILT_SOURCES = AST_ERR ast_err.h src/version.h
839
+ else
840
+ BUILT_SOURCES = ast_err.h src/version.h
841
+ endif
792
842
793
843
# Form a second link to the main object library (static and shared). This
794
844
# is used when a second pass through the library is needed during linking
@@ -852,7 +902,7 @@ test: install
852
902
853
903
# ast_test_LDADD = `ast_link`
854
904
# 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
856
906
857
907
# Need to include latex support files in the distribution tar ball so
858
908
# that the docs can be built from the tex source files. Requires environment
0 commit comments