Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osx: support GCC 4.6+ and Clang 3.3+ #1

Merged
merged 1 commit into from
Apr 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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