Skip to content

Commit

Permalink
Merge pull request #1 from guitorri/fix_gcc_clang_osx
Browse files Browse the repository at this point in the history
osx: support GCC 4.6+ and Clang 3.3+
  • Loading branch information
guitorri committed Apr 13, 2014
2 parents 4b6b96c + 15b9a31 commit 702181c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
24 changes: 15 additions & 9 deletions qucs-core/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,26 @@ case $host_os in
;;

*darwin* )
dnl Check for MacOSX, require clang++
if test "$CXX" = "clang++" ; then
AC_MSG_CHECKING([whether clang works])

dnl MacOSX, clang++ flags
if test "$CXX" = "clang++" ; then
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe -fno-exceptions -stdlib=libc++"
LDDFLAGS="$LDDFLAGS -stdlib=libc++"
LIBS="$LIBS -lc++"
if test $USE_MAINTAINER_MODE = yes; then
CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -W -Wall"
fi
else
AC_MSG_ERROR([clang++ required but not found])
fi

dnl MacOSX, GCC flags
if test "$CXX" = "g++" ; then
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe -fno-exceptions"
LDDFLAGS="$LDDFLAGS"
LIBS="$LIBS"
fi

if test $USE_MAINTAINER_MODE = yes; then
CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -W -Wall"
fi
;;

Expand Down
21 changes: 8 additions & 13 deletions qucs/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,14 @@ case $host_os in
fi
;;

*darwin* )
dnl Check for MacOSX, require clang++
if test "$CXX" = "clang++" ; then
AC_MSG_CHECKING([whether clang works])

CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
if test $USE_MAINTAINER_MODE = yes; then
CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -W -Wall"
fi
else
AC_MSG_ERROR([clang++ required but not found])
*darwin* )
dnl MacOSX, common flags to GCC or Clang

CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
if test $USE_MAINTAINER_MODE = yes; then
CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -W -Wall"
fi

dnl Check for Qt in:
Expand Down

0 comments on commit 702181c

Please sign in to comment.