@@ -1763,22 +1763,22 @@ subroutine init_hdf5(this,compiler,error)
1763
1763
1764
1764
! > Find pkg-config package file by priority
1765
1765
name = ' NOT_FOUND'
1766
- do i= 1 ,size (candidates)
1766
+ find_package: do i= 1 ,size (candidates)
1767
1767
if (pkgcfg_has_package(trim (candidates(i)))) then
1768
1768
name = trim (candidates(i))
1769
- exit
1769
+ exit find_package
1770
1770
end if
1771
- end do
1771
+ end do find_package
1772
1772
1773
1773
! > some distros put hdf5-1.2.3.pc with version number in .pc filename.
1774
1774
if (name==' NOT_FOUND' ) then
1775
1775
modules = pkgcfg_list_all(error)
1776
- do i= 1 ,size (modules)
1776
+ find_global_package: do i= 1 ,size (modules)
1777
1777
if (str_begins_with_str(modules(i)% s,' hdf5' )) then
1778
1778
name = modules(i)% s
1779
- exit
1779
+ exit find_global_package
1780
1780
end if
1781
- end do
1781
+ end do find_global_package
1782
1782
end if
1783
1783
1784
1784
if (name==' NOT_FOUND' ) then
@@ -1804,8 +1804,6 @@ subroutine init_hdf5(this,compiler,error)
1804
1804
this% has_link_libraries = .true.
1805
1805
this% link_libs = [this% link_libs, string_t(libs(i)% s(3 :))]
1806
1806
1807
- print * , ' HDF5: add link library ' // libs(i)% s(3 :)
1808
-
1809
1807
else ! -L and others: concatenate
1810
1808
this% has_link_flags = .true.
1811
1809
this% link_flags = string_t(trim (this% link_flags% s)// ' ' // libs(i)% s)
@@ -1817,17 +1815,9 @@ subroutine init_hdf5(this,compiler,error)
1817
1815
libdir = libs(i)% s(9 :)
1818
1816
endif
1819
1817
1820
- print * , ' HDF5: add link flag ' // libs(i)% s
1821
-
1822
1818
end if
1823
1819
end do
1824
1820
1825
- print * , ' libdir = ' ,libdir
1826
- do i= 1 ,size (this% link_libs)
1827
- print * , ' -l' // this% link_libs(i)% s
1828
- end do
1829
-
1830
-
1831
1821
! Some pkg-config hdf5.pc (e.g. Ubuntu) don't include the commonly-used HL HDF5 libraries,
1832
1822
! so let's add them if they exist
1833
1823
if (len_trim (libdir)>0 ) then
@@ -1843,8 +1833,6 @@ subroutine init_hdf5(this,compiler,error)
1843
1833
! Search how many versions with the Fortran endings there are
1844
1834
finals: do k= 1 ,size (find_hl)
1845
1835
do j= 1 ,size (this% link_libs)
1846
- print * , this% link_libs(j)% s,' begins? ' ,str_begins_with_str(this% link_libs(j)% s,this% link_libs(i)% s), &
1847
- ' ends? ' ,str_ends_with(this% link_libs(j)% s,trim (find_hl(k)))
1848
1836
if (str_begins_with_str(this% link_libs(j)% s,this% link_libs(i)% s) .and. &
1849
1837
str_ends_with(this% link_libs(j)% s,trim (find_hl(k)))) then
1850
1838
found_hl(k) = .true.
@@ -1853,8 +1841,6 @@ subroutine init_hdf5(this,compiler,error)
1853
1841
end do
1854
1842
end do finals
1855
1843
1856
- print * , ' lib ' ,this% link_libs(i)% s,' found = ' ,found_hl
1857
-
1858
1844
! For each of the missing ones, if there is a file, add it
1859
1845
add_missing: do k= 1 ,size (find_hl)
1860
1846
if (found_hl(k)) cycle add_missing
@@ -1874,11 +1860,6 @@ subroutine init_hdf5(this,compiler,error)
1874
1860
end do
1875
1861
endif
1876
1862
1877
- print * , ' final link libs: '
1878
- do i= 1 ,size (this% link_libs)
1879
- print * , ' -l' // this% link_libs(i)% s
1880
- end do
1881
-
1882
1863
! > Get compiler flags
1883
1864
flags = pkgcfg_get_build_flags(name,.true. ,error)
1884
1865
if (allocated (error)) return
0 commit comments