summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/misc.m456
1 files changed, 56 insertions, 0 deletions
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index e2564c2b80a..6f93f38f119 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -710,3 +710,59 @@ fi
])
+AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
+case $SYSTEM_TYPE in
+ *netware*)
+ CXX_VERSION=`$CXX -version | grep -i version`
+ ;;
+ *)
+ CXX_VERSION=`$CXX --version | sed 1q`
+ if test $? -ne "0" -o -z "$CXX_VERSION"
+ then
+ CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
+ fi
+ if test $? -ne "0" -o -z "$CXX_VERSION"
+ then
+ CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
+ fi
+ if test $? -ne "0" -o -z "$CXX_VERSION"
+ then
+ CXX_VERSION=""
+ fi
+esac
+if test "$CXX_VERSION"
+then
+ AC_MSG_CHECKING("C++ compiler version");
+ AC_MSG_RESULT("$CXX $CXX_VERSION")
+fi
+AC_SUBST(CXX_VERSION)
+])
+
+AC_DEFUN([MYSQL_PROG_AR], [
+AC_REQUIRE([MYSQL_CHECK_CXX_VERSION])
+case $CXX_VERSION in
+ MIPSpro*)
+ AR=$CXX
+ ARFLAGS="-ar -o"
+ ;;
+ *Forte*)
+ AR=$CXX
+ ARFLAGS="-xar -o"
+ ;;
+ *)
+ if test -z "$AR"
+ then
+ AC_CHECK_PROG([AR], [ar], [ar])
+ fi
+ if test -z "$AR"
+ then
+ AC_MSG_ERROR([You need ar to build the library])
+ fi
+ if test -z "$ARFLAGS"
+ then
+ ARFLAGS="cru"
+ fi
+esac
+AC_SUBST(AR)
+AC_SUBST(ARFLAGS)
+])