Skip to content
Snippets Groups Projects
Commit 3326bccb authored by card_captor's avatar card_captor
Browse files

Modified configure.in to use Sun's compiler correctly in Solaris/x86.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2477 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 9a431464
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.659 2008/03/04 21:24:58 ballen4705 Exp $ $Id: CHANGELOG,v 1.660 2008/03/09 13:41:23 card_captor Exp $
The most recent version of this file is: The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
...@@ -38,6 +38,8 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -38,6 +38,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
SMARTMONTOOLS STABLE RELEASE 5.38 2008/03/04 SMARTMONTOOLS STABLE RELEASE 5.38 2008/03/04
[KS] Solaris/x86: modified configure.in for Sun's compiler.
[BA] smartd.initd.in addition from Erwan Velu <erwan@seanodes.com> [BA] smartd.initd.in addition from Erwan Velu <erwan@seanodes.com>
[BA] smartd fixes: [BA] smartd fixes:
......
# #
# $Id: configure.in,v 1.133 2008/03/04 22:28:25 ballen4705 Exp $ # $Id: configure.in,v 1.134 2008/03/09 13:41:23 card_captor Exp $
# #
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50) AC_PREREQ(2.50)
...@@ -7,7 +7,7 @@ AC_INIT(smartmontools, 5.38, smartmontools-support@lists.sourceforge.net) ...@@ -7,7 +7,7 @@ AC_INIT(smartmontools, 5.38, smartmontools-support@lists.sourceforge.net)
AC_CONFIG_SRCDIR(smartctl.cpp) AC_CONFIG_SRCDIR(smartctl.cpp)
smartmontools_configure_date=`date -u +"%Y/%m/%d %T %Z"` smartmontools_configure_date=`date -u +"%Y/%m/%d %T %Z"`
smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.133 2008/03/04 22:28:25 ballen4705 Exp $'` smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.134 2008/03/09 13:41:23 card_captor Exp $'`
smartmontools_release_date=2008/03/04 smartmontools_release_date=2008/03/04
smartmontools_release_time="22:28:04 GMT" smartmontools_release_time="22:28:04 GMT"
...@@ -106,6 +106,10 @@ AH_TEMPLATE(HAVE_ATTR_PACKED, [Define to 1 if C++ compiler supports __attribute_ ...@@ -106,6 +106,10 @@ AH_TEMPLATE(HAVE_ATTR_PACKED, [Define to 1 if C++ compiler supports __attribute_
AC_MSG_CHECKING([whether C++ compiler supports __attribute__((packed))]) AC_MSG_CHECKING([whether C++ compiler supports __attribute__((packed))])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[struct a { int b; } __attribute__((packed));]])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[struct a { int b; } __attribute__((packed));]])],
[gcc_have_attr_packed=yes], [gcc_have_attr_packed=no]) [gcc_have_attr_packed=yes], [gcc_have_attr_packed=no])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#error "Sun's compiler cannot handle __attribute__((packed))!"
#endif]])],
[true], [gcc_have_attr_packed=no])
AC_SUBST(gcc_have_attr_packed) AC_SUBST(gcc_have_attr_packed)
if test "$gcc_have_attr_packed" = "yes"; then if test "$gcc_have_attr_packed" = "yes"; then
AC_DEFINE(HAVE_ATTR_PACKED) AC_DEFINE(HAVE_ATTR_PACKED)
...@@ -212,12 +216,15 @@ if test "x$GCC" = "xyes"; then ...@@ -212,12 +216,15 @@ if test "x$GCC" = "xyes"; then
else else
dnl We are NOT using gcc, so enable host-specific compiler flags dnl We are NOT using gcc, so enable host-specific compiler flags
case "${host}" in case "${host}" in
*-*-solaris*) sparc*-*-solaris*)
dnl set CXXFLAGS for Solaris C++ compiler dnl set CXXFLAGS for Solaris/SPARC C++ compiler
if test -z "`echo "$CXXFLAGS" | grep "\-xmemalign" 2> /dev/null`" ; then if test -z "`echo "$CXXFLAGS" | grep "\-xmemalign" 2> /dev/null`" ; then
dnl we have to tell the compilers about packed ATA structures dnl we have to tell the compilers about packed ATA structures
CXXFLAGS="-xmemalign=1i $CXXFLAGS" CXXFLAGS="-xmemalign=1i $CXXFLAGS"
fi fi
esac
case "${host}" in
*-*-solaris*)
if test -z "`echo "$CXXFLAGS" | grep "\-xO" 2> /dev/null`" ; then if test -z "`echo "$CXXFLAGS" | grep "\-xO" 2> /dev/null`" ; then
dnl turn on optimization if user has not explicitly set its value dnl turn on optimization if user has not explicitly set its value
CXXFLAGS="-xO2 $CXXFLAGS" CXXFLAGS="-xO2 $CXXFLAGS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment