506
506
507
507
AC_MSG_CHECKING([if MPI Extension $component has mpif.h bindings])
508
508
509
- if test -e " $test_header " ; then
509
+ if test -e " $test_header " || test -e " $test_header " .in ; then
510
510
AC_MSG_RESULT([yes])
511
511
enabled_mpifh=1
512
512
541
541
AC_MSG_ERROR([Cannot continue])])
542
542
543
543
component_header=" mpiext_${component} _mpifh.h"
544
+ mpifh_component_header_path=" ompi/mpiext/$component /mpif-h/${component_header} "
545
+ if test -e " ${srcdir} /${mpifh_component_header_path} " ; then
546
+ mpifh_component_header_path=" ${srcdir} /${mpifh_component_header_path} "
547
+ fi
544
548
545
549
cat >> $mpif_ext_h << EOF
546
550
!
@@ -577,12 +581,17 @@ EOF
577
581
578
582
AC_MSG_CHECKING([if MPI Extension $component has " use mpi" bindings])
579
583
580
- if test -e " $test_header " ; then
584
+ if test -e " $test_header " || test -e " $test_header " .in ; then
581
585
AC_MSG_RESULT([yes])
582
586
583
587
EXT_USEMPI_HEADERS=" $EXT_USEMPI_HEADERS mpiext/$component /use-mpi/mpiext_${component} _usempi.h"
584
588
$5 =" $$ 5 $component "
589
+
585
590
component_header=" mpiext_${component} _usempi.h"
591
+ usempi_component_header_path=" ompi/mpiext/$component /use-mpi/$component_header "
592
+ if test -e " ${srcdir} /${usempi_component_header_path} " ; then
593
+ usempi_component_header_path=" ${srcdir} /${usempi_component_header_path} "
594
+ fi
586
595
587
596
cat >> $mpiusempi_ext_h << EOF
588
597
!
@@ -597,12 +606,12 @@ EOF
597
606
if test " $enabled_mpifh " = 1; then
598
607
mpifh_component_header=" mpiext_${component} _mpifh.h"
599
608
cat >> $mpiusempi_ext_h << EOF
600
- #include "${srcdir} /ompi/mpiext/ $component /mpif-h/ $mpifh_component_header "
609
+ #include "${mpifh_component_header_path} "
601
610
EOF
602
611
fi
603
612
604
613
cat >> $mpiusempi_ext_h << EOF
605
- #include "${srcdir} /ompi/mpiext/ $component /use-mpi/ $component_header "
614
+ #include "${usempi_component_header_path} "
606
615
607
616
EOF
608
617
else
@@ -628,13 +637,17 @@ EOF
628
637
629
638
AC_MSG_CHECKING([if MPI Extension $component has " use mpi_f08" bindings])
630
639
631
- if test -e " $test_header " ; then
640
+ if test -e " $test_header " || test -e " $test_header " .in ; then
632
641
AC_MSG_RESULT([yes])
633
642
634
643
EXT_USEMPIF08_HEADERS=" $EXT_USEMPIF08_HEADERS mpiext/$component /use-mpi-f08/mpiext_${component} _usempif08.h"
635
644
$6 =" $$ 6 $component "
636
645
637
646
component_header=" mpiext_${component} _usempif08.h"
647
+ usempif08_component_header_path=" ompi/mpiext/$component /use-mpi-f08/$component_header "
648
+ if test -e " ${srcdir} /${usempif08_component_header_path} " ; then
649
+ usempif08_component_header_path=" ${srcdir} /${usempif08_component_header_path} "
650
+ fi
638
651
639
652
cat >> $mpiusempif08_ext_h << EOF
640
653
!
@@ -649,12 +662,12 @@ EOF
649
662
if test " $enabled_mpifh " = 1; then
650
663
mpifh_component_header=" mpiext_${component} _mpifh.h"
651
664
cat >> $mpiusempif08_ext_h << EOF
652
- #include "${srcdir} /ompi/mpiext/ $component /mpif-h/ $mpifh_component_header "
665
+ #include "${mpifh_component_header_path} "
653
666
EOF
654
667
fi
655
668
656
669
cat >> $mpiusempif08_ext_h << EOF
657
- #include "${srcdir} /ompi/mpiext/ $component /use-mpi-f08/ $component_header "
670
+ #include "${usempif08_component_header_path} "
658
671
659
672
EOF
660
673
else
0 commit comments