Skip to content

Commit af16318

Browse files
author
jim
committed
Allow user to explicitly determine whether or not BSD syntax
makefiles should be created... The default is NO unless we are on a *BSD* system, in which case we actually see if 'make' is gmake or not. git-svn-id: http://svn.apache.org/repos/asf/httpd/httpd/trunk@1553134 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0433780 commit af16318

File tree

1 file changed

+35
-16
lines changed

1 file changed

+35
-16
lines changed

configure.in

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,15 @@ if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
865865
[Allow IPv4 connections on IPv6 listening sockets])
866866
fi
867867

868+
AC_ARG_ENABLE(bsd-makefiles,APACHE_HELP_STRING(--enable-bsd-makefiles,use BSD Makefile syntax),
869+
[
870+
FORCE_BSD_MAKEFILE=$enableval
871+
AC_MSG_NOTICE([Setting "FORCE_BSD_MAKEFILE" to $FORCE_BSD_MAKEFILE])
872+
],
873+
[
874+
FORCE_BSD_MAKEFILE="auto"
875+
])
876+
868877
APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile)
869878
APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
870879
APACHE_FAST_OUTPUT(support/Makefile)
@@ -911,27 +920,37 @@ AC_SUBST(perlbin)
911920

912921
dnl If we are running on a BSD variant, see if we need to use the BSD .include syntax.
913922

914-
BSD_MAKEFILE=no
915923
ap_make_include=include
916924
ap_make_ifdef=ifdef
917925
ap_make_else=else
918926
ap_make_endif=endif
919927
ap_make_delimiter=' '
920-
case $host in
921-
*bsd*)
922-
# Check whether they've installed GNU make
923-
if make --version > /dev/null 2>&1; then
924-
true
925-
else
926-
BSD_MAKEFILE=yes
927-
ap_make_include=.include
928-
ap_make_ifdef=.ifdef
929-
ap_make_else=.else
930-
ap_make_endif=.endif
931-
ap_make_delimiter='"'
932-
fi
933-
;;
934-
esac
928+
if test "x$FORCE_BSD_MAKEFILE" = "xno"; then
929+
BSD_MAKEFILE=no
930+
elif test "x$FORCE_BSD_MAKEFILE" = "xyes"; then
931+
BSD_MAKEFILE=yes
932+
else
933+
case $host in
934+
*bsd*)
935+
# Check whether they've installed GNU make
936+
if make --version > /dev/null 2>&1; then
937+
BSD_MAKEFILE=no
938+
else
939+
BSD_MAKEFILE=yes
940+
fi
941+
;;
942+
*)
943+
BSD_MAKEFILE=no
944+
;;
945+
esac
946+
fi
947+
if test "x$BSD_MAKEFILE" = "xyes"; then
948+
ap_make_include=.include
949+
ap_make_ifdef=.ifdef
950+
ap_make_else=.else
951+
ap_make_endif=.endif
952+
ap_make_delimiter='"'
953+
fi
935954
AC_MSG_NOTICE([using BSD Makefile syntax... $BSD_MAKEFILE])
936955

937956
AC_SUBST(ap_make_include)

0 commit comments

Comments
 (0)