]> git.saurik.com Git - wxWidgets.git/blobdiff - build/aclocal/bakefile.m4
made (many) more wxGrid methods const
[wxWidgets.git] / build / aclocal / bakefile.m4
index 83cf7a32d7c4ae1ec79942f0b5b91f01a996bc44..944b485467b2cfcc046d614518e686695daa116c 100644 (file)
@@ -287,7 +287,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
                 AC_TRY_COMPILE([],
                     [
                         #ifndef __INTEL_COMPILER
-                        #error Not ICC
+                        This is not ICC
                         #endif
                     ],
                     bakefile_cv_prog_icc=yes,
@@ -329,7 +329,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
                [
                    #if (__GNUC__ < 3) || \
                        ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
-                       #error old gcc
+                       This is old gcc
                    #endif
                ],
                [
@@ -421,6 +421,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
 
       powerpc-apple-macos* | \
       *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
+      *-*-mirbsd* | \
       *-*-sunos4* | \
       *-*-osf* | \
       *-*-dgux5* | \
@@ -430,7 +431,8 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
       ;;
 
       *)
-        AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
+        dnl wxWidgets-specific: allow unknown Unix systems
+        dnl AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
     esac
 
     if test "x$PIC_FLAG" != "x" ; then
@@ -521,6 +523,7 @@ AC_DEFUN([AC_BAKEFILE_DEPS],
     
     AC_MSG_CHECKING([for dependency tracking method])
 
+    BK_DEPS=""
     if test "x$bk_use_trackdeps" = "xno" ; then
         DEPS_TRACKING=0
         AC_MSG_RESULT([disabled])
@@ -568,10 +571,14 @@ AC_DEFUN([AC_BAKEFILE_DEPS],
         if test $DEPS_TRACKING = 1 ; then
             AC_BAKEFILE_CREATE_FILE_BK_DEPS
             chmod +x bk-deps
+            dnl FIXME: make this $(top_builddir)/bk-deps once autoconf-2.60
+            dnl        is required (and so top_builddir is never empty):
+            BK_DEPS="`pwd`/bk-deps"
         fi
     fi
 
     AC_SUBST(DEPS_TRACKING)
+    AC_SUBST(BK_DEPS)
 ])
 
 dnl ---------------------------------------------------------------------------
@@ -590,7 +597,19 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
     AC_PROG_MAKE_SET
     AC_SUBST(MAKE_SET)
     
-    AC_CHECK_TOOL(AR, ar, ar)
+    if test "x$SUNCXX" = "xyes"; then
+        dnl Sun C++ compiler requires special way of creating static libs;
+        dnl see here for more details:
+        dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863
+        AR=${AR:-"$CXX"}
+        AC_SUBST(AR)
+        AROPTIONS=${AROPTIONS:-"-xar -o"}
+    else
+        AC_CHECK_TOOL(AR, ar, ar)
+        AROPTIONS=rcu
+    fi
+    AC_SUBST(AROPTIONS)
+
     AC_CHECK_TOOL(STRIP, strip, :)
     AC_CHECK_TOOL(NM, nm, :)
 
@@ -600,7 +619,10 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
             dnl use it there
             INSTALL_DIR="mkdir -p"
             ;;
-        *)  INSTALL_DIR="$INSTALL -d"
+        * )
+            dnl we must refer to makefile's $(INSTALL) variable and not
+            dnl current value of shell variable, hence the single quoting:
+            INSTALL_DIR='$(INSTALL) -d'
             ;;
     esac
     AC_SUBST(INSTALL_DIR)
@@ -656,6 +678,7 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
     GCC_PCH=0
     ICC_PCH=0
     USE_PCH=0
+    BK_MAKE_PCH=""
 
     case ${BAKEFILE_HOST} in 
         *-*-cygwin* )
@@ -673,16 +696,16 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
             AC_TRY_COMPILE([],
                 [
                     #if !defined(__GNUC__) || !defined(__GNUC_MINOR__)
-                        #error "no pch support"
+                        There is no PCH support
                     #endif
                     #if (__GNUC__ < 3)
-                        #error "no pch support"
+                        There is no PCH support
                     #endif
                     #if (__GNUC__ == 3) && \
                        ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \
                        ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \
                        ( defined(__INTEL_COMPILER) )
-                        #error "no pch support"
+                        There is no PCH support
                     #endif
                 ],
                 [
@@ -694,7 +717,7 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
                         [
                             #if !defined(__INTEL_COMPILER) || \
                                 (__INTEL_COMPILER < 800)
-                                #error "no pch support"
+                                There is no PCH support
                             #endif
                         ],
                         [
@@ -709,12 +732,17 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
                 USE_PCH=1
                 AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH
                 chmod +x bk-make-pch
+                dnl FIXME: make this $(top_builddir)/bk-make-pch once
+                dnl        autoconf-2.60 is required (and so top_builddir is
+                dnl        never empty):
+                BK_MAKE_PCH="`pwd`/bk-make-pch"
             fi
         fi
     fi
 
     AC_SUBST(GCC_PCH)
     AC_SUBST(ICC_PCH)
+    AC_SUBST(BK_MAKE_PCH)
 ])
 
 
@@ -742,7 +770,7 @@ dnl ---------------------------------------------------------------------------
 
 AC_DEFUN([AC_BAKEFILE],
 [
-    AC_PREREQ(2.58)
+    AC_PREREQ([2.58])
 
     if test "x$BAKEFILE_HOST" = "x"; then
                if test "x${host}" = "x" ; then
@@ -764,7 +792,7 @@ AC_DEFUN([AC_BAKEFILE],
     AC_BAKEFILE_DEPS
     AC_BAKEFILE_RES_COMPILERS
 
-    BAKEFILE_BAKEFILE_M4_VERSION="0.2.0"
+    BAKEFILE_BAKEFILE_M4_VERSION="0.2.1"
    
     dnl includes autoconf_inc.m4:
     $1