]> granicus.if.org Git - apache/commitdiff
Allow user to explicitly determine whether or not BSD syntax
authorJim Jagielski <jim@apache.org>
Mon, 23 Dec 2013 16:08:36 +0000 (16:08 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 23 Dec 2013 16:08:36 +0000 (16:08 +0000)
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: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1553134 13f79535-47bb-0310-9956-ffa450edef68

configure.in

index 074cfd14b44e668ac8d621ad2444078c957666b5..937cd441f48dfff1cabde6a1fbde1cb7ec6914c1 100644 (file)
@@ -865,6 +865,15 @@ if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
               [Allow IPv4 connections on IPv6 listening sockets])
 fi
 
+AC_ARG_ENABLE(bsd-makefiles,APACHE_HELP_STRING(--enable-bsd-makefiles,use BSD Makefile syntax),
+[
+  FORCE_BSD_MAKEFILE=$enableval
+  AC_MSG_NOTICE([Setting "FORCE_BSD_MAKEFILE" to $FORCE_BSD_MAKEFILE])
+],
+[
+  FORCE_BSD_MAKEFILE="auto"
+])
+
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile)
@@ -911,27 +920,37 @@ AC_SUBST(perlbin)
 
 dnl If we are running on a BSD variant, see if we need to use the BSD .include syntax.
 
-BSD_MAKEFILE=no
 ap_make_include=include
 ap_make_ifdef=ifdef
 ap_make_else=else
 ap_make_endif=endif
 ap_make_delimiter=' '
-case $host in
-*bsd*)
-    # Check whether they've installed GNU make
-    if make --version > /dev/null 2>&1; then
-        true
-    else
-        BSD_MAKEFILE=yes
-        ap_make_include=.include
-        ap_make_ifdef=.ifdef
-        ap_make_else=.else
-        ap_make_endif=.endif
-        ap_make_delimiter='"'
-    fi
-    ;;
-esac
+if test "x$FORCE_BSD_MAKEFILE" = "xno"; then
+  BSD_MAKEFILE=no
+elif test "x$FORCE_BSD_MAKEFILE" = "xyes"; then
+  BSD_MAKEFILE=yes
+else
+  case $host in
+  *bsd*)
+      # Check whether they've installed GNU make
+      if make --version > /dev/null 2>&1; then
+          BSD_MAKEFILE=no
+      else
+          BSD_MAKEFILE=yes
+      fi
+      ;;
+  *)
+      BSD_MAKEFILE=no
+      ;;
+  esac
+fi
+if test "x$BSD_MAKEFILE" = "xyes"; then
+  ap_make_include=.include
+  ap_make_ifdef=.ifdef
+  ap_make_else=.else
+  ap_make_endif=.endif
+  ap_make_delimiter='"'
+fi
 AC_MSG_NOTICE([using BSD Makefile syntax... $BSD_MAKEFILE])
 
 AC_SUBST(ap_make_include)