@@ -57,6 +57,9 @@ dnl detect compiler (prefer gcc over clang) and set $CC (unless CC already set),
5757dnl later CC is copied to CC_STAGE{1,2,3}
5858AC_PROG_CC ( [ cc gcc clang] )
5959
60+ dnl Portable mkdir -p (sets MKDIR_P)
61+ AC_PROG_MKDIR_P
62+
6063dnl make extensions visible to allow feature-tests to detect them lateron
6164AC_USE_SYSTEM_EXTENSIONS
6265
@@ -444,7 +447,7 @@ dnl Generate ghcplatform.h
444447dnl ######################################################################
445448
446449[
447- mkdir -p include
450+ ${MKDIR_P} include
448451
449452touch include/ghcplatform.h
450453> include/ghcplatform.h
@@ -537,47 +540,47 @@ else
537540fi
538541
539542AC_MSG_CHECKING ( [ for include/rts/AutoApply.cmm.h] )
540- if mkdir -p include/rts && $GENAPPLY include/DerivedConstants.h > include/rts/AutoApply.cmm.h; then
543+ if ${MKDIR_P} include/rts && $GENAPPLY include/DerivedConstants.h > include/rts/AutoApply.cmm.h; then
541544 AC_MSG_RESULT ( [ created] )
542545else
543546 AC_MSG_RESULT ( [ failed to create] )
544547 AC_MSG_ERROR ( [ Failed to run $GENAPPLY include/DerivedConstants.h > include/rts/AutoApply.cmm.h] )
545548fi
546549
547550AC_MSG_CHECKING ( [ for include/rts/AutoApply_V16.cmm.h] )
548- if mkdir -p include/rts && $GENAPPLY include/DerivedConstants.h -V16 > include/rts/AutoApply_V16.cmm.h; then
551+ if ${MKDIR_P} include/rts && $GENAPPLY include/DerivedConstants.h -V16 > include/rts/AutoApply_V16.cmm.h; then
549552 AC_MSG_RESULT ( [ created] )
550553else
551554 AC_MSG_RESULT ( [ failed to create] )
552555 AC_MSG_ERROR ( [ Failed to run $GENAPPLY include/DerivedConstants.h -V16 > include/rts/AutoApply_V16.cmm.h] )
553556fi
554557
555558AC_MSG_CHECKING ( [ for include/rts/AutoApply_V32.cmm.h] )
556- if mkdir -p include/rts && $GENAPPLY include/DerivedConstants.h -V32 > include/rts/AutoApply_V32.cmm.h; then
559+ if ${MKDIR_P} include/rts && $GENAPPLY include/DerivedConstants.h -V32 > include/rts/AutoApply_V32.cmm.h; then
557560 AC_MSG_RESULT ( [ created] )
558561else
559562 AC_MSG_RESULT ( [ failed to create] )
560563 AC_MSG_ERROR ( [ Failed to run $GENAPPLY include/DerivedConstants.h -V32 > include/rts/AutoApply_V32.cmm.h] )
561564fi
562565
563566AC_MSG_CHECKING ( [ for include/rts/AutoApply_V64.cmm.h] )
564- if mkdir -p include/rts && $GENAPPLY include/DerivedConstants.h -V64 > include/rts/AutoApply_V64.cmm.h; then
567+ if ${MKDIR_P} include/rts && $GENAPPLY include/DerivedConstants.h -V64 > include/rts/AutoApply_V64.cmm.h; then
565568 AC_MSG_RESULT ( [ created] )
566569else
567570 AC_MSG_RESULT ( [ failed to create] )
568571 AC_MSG_ERROR ( [ Failed to run $GENAPPLY include/DerivedConstants.h -V64 > include/rts/AutoApply_V64.cmm.h] )
569572fi
570573
571574AC_MSG_CHECKING ( [ for include/rts/EventLogConstants.h] )
572- if mkdir -p include/rts && $PYTHON $srcdir/gen_event_types.py --event-types-defines include/rts/EventLogConstants.h; then
575+ if ${MKDIR_P} include/rts && $PYTHON $srcdir/gen_event_types.py --event-types-defines include/rts/EventLogConstants.h; then
573576 AC_MSG_RESULT ( [ created] )
574577else
575578 AC_MSG_RESULT ( [ failed to create] )
576579 AC_MSG_ERROR ( [ Failed to run $PYTHON gen_event_types.py] )
577580fi
578581
579582AC_MSG_CHECKING ( [ for include/rts/EventTypes.h] )
580- if mkdir -p include/rts && $PYTHON $srcdir/gen_event_types.py --event-types-array include/rts/EventTypes.h; then
583+ if ${MKDIR_P} include/rts && $PYTHON $srcdir/gen_event_types.py --event-types-array include/rts/EventTypes.h; then
581584 AC_MSG_RESULT ( [ created] )
582585else
583586 AC_MSG_RESULT ( [ failed to create] )
0 commit comments