@@ -1763,22 +1763,22 @@ subroutine init_hdf5(this,compiler,error)
17631763
17641764 ! > Find pkg-config package file by priority
17651765 name = ' NOT_FOUND'
1766- do i= 1 ,size (candidates)
1766+ find_package: do i= 1 ,size (candidates)
17671767 if (pkgcfg_has_package(trim (candidates(i)))) then
17681768 name = trim (candidates(i))
1769- exit
1769+ exit find_package
17701770 end if
1771- end do
1771+ end do find_package
17721772
17731773 ! > some distros put hdf5-1.2.3.pc with version number in .pc filename.
17741774 if (name==' NOT_FOUND' ) then
17751775 modules = pkgcfg_list_all(error)
1776- do i= 1 ,size (modules)
1776+ find_global_package: do i= 1 ,size (modules)
17771777 if (str_begins_with_str(modules(i)% s,' hdf5' )) then
17781778 name = modules(i)% s
1779- exit
1779+ exit find_global_package
17801780 end if
1781- end do
1781+ end do find_global_package
17821782 end if
17831783
17841784 if (name==' NOT_FOUND' ) then
@@ -1804,8 +1804,6 @@ subroutine init_hdf5(this,compiler,error)
18041804 this% has_link_libraries = .true.
18051805 this% link_libs = [this% link_libs, string_t(libs(i)% s(3 :))]
18061806
1807- print * , ' HDF5: add link library ' // libs(i)% s(3 :)
1808-
18091807 else ! -L and others: concatenate
18101808 this% has_link_flags = .true.
18111809 this% link_flags = string_t(trim (this% link_flags% s)// ' ' // libs(i)% s)
@@ -1817,17 +1815,9 @@ subroutine init_hdf5(this,compiler,error)
18171815 libdir = libs(i)% s(9 :)
18181816 endif
18191817
1820- print * , ' HDF5: add link flag ' // libs(i)% s
1821-
18221818 end if
18231819 end do
18241820
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-
18311821 ! Some pkg-config hdf5.pc (e.g. Ubuntu) don't include the commonly-used HL HDF5 libraries,
18321822 ! so let's add them if they exist
18331823 if (len_trim (libdir)>0 ) then
@@ -1843,8 +1833,6 @@ subroutine init_hdf5(this,compiler,error)
18431833 ! Search how many versions with the Fortran endings there are
18441834 finals: do k= 1 ,size (find_hl)
18451835 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)))
18481836 if (str_begins_with_str(this% link_libs(j)% s,this% link_libs(i)% s) .and. &
18491837 str_ends_with(this% link_libs(j)% s,trim (find_hl(k)))) then
18501838 found_hl(k) = .true.
@@ -1853,8 +1841,6 @@ subroutine init_hdf5(this,compiler,error)
18531841 end do
18541842 end do finals
18551843
1856- print * , ' lib ' ,this% link_libs(i)% s,' found = ' ,found_hl
1857-
18581844 ! For each of the missing ones, if there is a file, add it
18591845 add_missing: do k= 1 ,size (find_hl)
18601846 if (found_hl(k)) cycle add_missing
@@ -1874,11 +1860,6 @@ subroutine init_hdf5(this,compiler,error)
18741860 end do
18751861 endif
18761862
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-
18821863 ! > Get compiler flags
18831864 flags = pkgcfg_get_build_flags(name,.true. ,error)
18841865 if (allocated (error)) return
0 commit comments