[Freeswitch-branches] [commit] r1824 - freeswitch/branches/stkn
Freeswitch SVN
stkn at freeswitch.org
Mon Jul 10 20:47:13 EDT 2006
Author: stkn
Date: Mon Jul 10 20:47:08 2006
New Revision: 1824
Modified:
freeswitch/branches/stkn/Makefile.in
freeswitch/branches/stkn/configure
freeswitch/branches/stkn/configure.in
Log:
configure arch and os detection tweaks
Modified: freeswitch/branches/stkn/Makefile.in
==============================================================================
--- freeswitch/branches/stkn/Makefile.in (original)
+++ freeswitch/branches/stkn/Makefile.in Mon Jul 10 20:47:08 2006
@@ -181,6 +181,8 @@
ISMAC_TRUE = @ISMAC_TRUE@
ISPPC_FALSE = @ISPPC_FALSE@
ISPPC_TRUE = @ISPPC_TRUE@
+ISSUN_FALSE = @ISSUN_FALSE@
+ISSUN_TRUE = @ISSUN_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
Modified: freeswitch/branches/stkn/configure
==============================================================================
--- freeswitch/branches/stkn/configure (original)
+++ freeswitch/branches/stkn/configure Mon Jul 10 20:47:08 2006
@@ -466,7 +466,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE ISPPC_TRUE ISPPC_FALSE ISGCC_TRUE ISGCC_FALSE USE_GCCVISIBILITY_TRUE USE_GCCVISIBILITY_FALSE LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE ISSUN_TRUE ISSUN_FALSE ISPPC_TRUE ISPPC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE ISGCC_TRUE ISGCC_FALSE USE_GCCVISIBILITY_TRUE USE_GCCVISIBILITY_FALSE LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -20801,9 +20801,32 @@
ac_config_files="$ac_config_files Makefile"
+#
+# OS detection
+#
+if test -z "$OS"
+then
+ case `uname -s` in
+ Linux|linux)
+ OS="LINUX"
+ ;;
+ Darwin|darwin)
+ OS="DARWIN"
+ ;;
+ SunOS)
+ OS="SUNOS"
+ ;;
+ *)
+ OS="`uname -s`"
+ ;;
+ esac
+fi
+OS="`echo $OS | tr ':lower:' ':upper:'`"
-if test `uname -s` = Linux; then
+
+
+if test "$OS" = "LINUX"; then
ISLINUX_TRUE=
ISLINUX_FALSE='#'
else
@@ -20813,7 +20836,7 @@
-if test `uname -s` = Darwin; then
+if test "$OS" = "DARWIN"; then
ISMAC_TRUE=
ISMAC_FALSE='#'
else
@@ -20823,30 +20846,46 @@
-if test `uname -m` = x86_64; then
- IS64BITLINUX_TRUE=
- IS64BITLINUX_FALSE='#'
+if test "$OS" = "SUNOS"; then
+ ISSUN_TRUE=
+ ISSUN_FALSE='#'
else
- IS64BITLINUX_TRUE='#'
- IS64BITLINUX_FALSE=
+ ISSUN_TRUE='#'
+ ISSUN_FALSE=
fi
+cat >>confdefs.h <<\_ACEOF
+#define FS_OS_$OS 1
+_ACEOF
+
+
# AM_CONDITIONAL(ISSUNOS, [test `uname -s` = SunOS])
# AM_CONDITIONAL(ISSUN64, [test `isainfo -b` = 64])
# AM_CONDITIONAL(ISSUNSPARC, [test `isainfo -n` = sparcv9])
-case `uname -m` in
- ppc|ppc64|powerpc)
- MACHINE="ppc"
- ;;
- *)
- MACHINE="`uname -m`"
- ;;
-esac
+#
+# Machine detection
+#
+if test -z "$MACHINE"
+then
+ case `uname -m` in
+ ppc|ppc64|powerpc)
+ MACHINE="PPC"
+ ;;
+ x86_64|x64|amd64)
+ MACHINE="X86_64"
+ ;;
+ *)
+ MACHINE="`uname -m`"
+ ;;
+ esac
+fi
+MACHINE="`echo $MACHINE | tr ':lower:' ':upper:'`"
-if test "$MACHINE" = "ppc"; then
+
+if test "$MACHINE" = "PPC"; then
ISPPC_TRUE=
ISPPC_FALSE='#'
else
@@ -20854,8 +20893,30 @@
ISPPC_FALSE=
fi
+cat >>confdefs.h <<\_ACEOF
+#define FS_ARCH_$MACHINE 1
+_ACEOF
+#
+# Misc Machine + OS
+#
+
+
+if test "$MACHINE" = "X86_64" -a "$OS" = "LINUX"; then
+ IS64BITLINUX_TRUE=
+ IS64BITLINUX_FALSE='#'
+else
+ IS64BITLINUX_TRUE='#'
+ IS64BITLINUX_FALSE=
+fi
+
+
+#
+# Compiler detection
+#
+
+
if test "$GCC" = "yes"; then
ISGCC_TRUE=
ISGCC_FALSE='#'
@@ -20877,7 +20938,7 @@
fi;
GCC_VER=0
-if test "x$GCC" = "xyes" && test "x$enable_visibility" = "xyes"
+if test "x$GCC" = "xyes" && test "x$enable_visibility" != "xno"
then
# check gcc version
echo "$as_me:$LINENO: checking GCC Version" >&5
@@ -21031,10 +21092,10 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${IS64BITLINUX_TRUE}" && test -z "${IS64BITLINUX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"IS64BITLINUX\" was never defined.
+if test -z "${ISSUN_TRUE}" && test -z "${ISSUN_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ISSUN\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"IS64BITLINUX\" was never defined.
+echo "$as_me: error: conditional \"ISSUN\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -21045,6 +21106,13 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${IS64BITLINUX_TRUE}" && test -z "${IS64BITLINUX_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"IS64BITLINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"IS64BITLINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${ISGCC_TRUE}" && test -z "${ISGCC_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"ISGCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -21664,10 +21732,12 @@
s, at ISLINUX_FALSE@,$ISLINUX_FALSE,;t t
s, at ISMAC_TRUE@,$ISMAC_TRUE,;t t
s, at ISMAC_FALSE@,$ISMAC_FALSE,;t t
-s, at IS64BITLINUX_TRUE@,$IS64BITLINUX_TRUE,;t t
-s, at IS64BITLINUX_FALSE@,$IS64BITLINUX_FALSE,;t t
+s, at ISSUN_TRUE@,$ISSUN_TRUE,;t t
+s, at ISSUN_FALSE@,$ISSUN_FALSE,;t t
s, at ISPPC_TRUE@,$ISPPC_TRUE,;t t
s, at ISPPC_FALSE@,$ISPPC_FALSE,;t t
+s, at IS64BITLINUX_TRUE@,$IS64BITLINUX_TRUE,;t t
+s, at IS64BITLINUX_FALSE@,$IS64BITLINUX_FALSE,;t t
s, at ISGCC_TRUE@,$ISGCC_TRUE,;t t
s, at ISGCC_FALSE@,$ISGCC_FALSE,;t t
s, at USE_GCCVISIBILITY_TRUE@,$USE_GCCVISIBILITY_TRUE,;t t
Modified: freeswitch/branches/stkn/configure.in
==============================================================================
--- freeswitch/branches/stkn/configure.in (original)
+++ freeswitch/branches/stkn/configure.in Mon Jul 10 20:47:08 2006
@@ -47,23 +47,69 @@
AC_CONFIG_FILES([Makefile])
-AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
-AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
-AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64])
+#
+# OS detection
+#
+if test -z "$OS"
+then
+ case `uname -s` in
+ Linux|linux)
+ OS="LINUX"
+ ;;
+ Darwin|darwin)
+ OS="DARWIN"
+ ;;
+ SunOS)
+ OS="SUNOS"
+ ;;
+ *)
+ OS="`uname -s`"
+ ;;
+ esac
+fi
+OS="`echo $OS | tr '[:lower:]' '[:upper:]'`"
+
+
+AM_CONDITIONAL([ISLINUX], [test "$OS" = "LINUX"])
+AM_CONDITIONAL([ISMAC], [test "$OS" = "DARWIN"])
+AM_CONDITIONAL([ISSUN], [test "$OS" = "SUNOS"])
+AC_DEFINE([FS_OS_$OS],[1])
+
# AM_CONDITIONAL(ISSUNOS, [test `uname -s` = SunOS])
# AM_CONDITIONAL(ISSUN64, [test `isainfo -b` = 64])
# AM_CONDITIONAL(ISSUNSPARC, [test `isainfo -n` = sparcv9])
-case `uname -m` in
- ppc|ppc64|powerpc)
- MACHINE="ppc"
- ;;
- *)
- MACHINE="`uname -m`"
- ;;
-esac
+#
+# Machine detection
+#
+if test -z "$MACHINE"
+then
+ case `uname -m` in
+ ppc|ppc64|powerpc)
+ MACHINE="PPC"
+ ;;
+ x86_64|x64|amd64)
+ MACHINE="X86_64"
+ ;;
+ *)
+ MACHINE="`uname -m`"
+ ;;
+ esac
+fi
+MACHINE="`echo $MACHINE | tr '[:lower:]' '[:upper:]'`"
-AM_CONDITIONAL(ISPPC, [test "$MACHINE" = "ppc"])
+
+AM_CONDITIONAL(ISPPC, [test "$MACHINE" = "PPC"])
+AC_DEFINE([FS_ARCH_$MACHINE],[1])
+
+#
+# Misc Machine + OS
+#
+AM_CONDITIONAL([IS64BITLINUX], [test "$MACHINE" = "X86_64" -a "$OS" = "LINUX"])
+
+#
+# Compiler detection
+#
AM_CONDITIONAL(ISGCC, [test "$GCC" = "yes"])
#
@@ -74,7 +120,7 @@
[Enable -fvisibility=hidden on Linux systems with GCC 4.0 and higher])],,[enable_visibility="no"])
GCC_VER=0
-if test "x$GCC" = "xyes" && test "x$enable_visibility" = "xyes"
+if test "x$GCC" = "xyes" && test "x$enable_visibility" != "xno"
then
# check gcc version
AC_MSG_CHECKING([GCC Version])
More information about the Freeswitch-branches
mailing list