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

Fix configure script to enable Clang building #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
25 changes: 19 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,26 @@ AC_PROG_RANLIB
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC

# AC_CHECK_LIB (library, function, [action-if-found], [action-if-not-found], [other-libraries])
AC_CHECK_LIB([c], [malloc, realloc, free, memset, memmove], [],
[AC_MSG_ERROR(Need standard c library!)],
[])
AC_CHECK_LIB([m], [sinf, cosf, expf, cargf, cexpf, crealf, cimagf, sqrtf], [],
[AC_MSG_ERROR(Need standard (complex) math library!)],
[])
AC_CHECK_LIB([c],[main], [],[AC_MSG_ERROR(Could not use standard C library)], [])
AC_CHECK_LIB([m],[main], [],[AC_MSG_ERROR(Could not use standard math library)],[])

# AC_CHECK_FUNC(function, [action-if-found], [action-if-not-found])
AC_CHECK_FUNC([malloc], [],[AC_MSG_ERROR(Could not use malloc())])
AC_CHECK_FUNC([realloc], [],[AC_MSG_ERROR(Could not use realloc())],)
AC_CHECK_FUNC([free], [],[AC_MSG_ERROR(Could not use free())],)
AC_CHECK_FUNC([memset], [],[AC_MSG_ERROR(Could not use memset())],)
AC_CHECK_FUNC([memmove], [],[AC_MSG_ERROR(Could not use memove())],)

AC_CHECK_FUNC([sinf], [],[AC_MSG_ERROR(Could not use sinf())],)
AC_CHECK_FUNC([cosf], [],[AC_MSG_ERROR(Could not use cosf())],)
AC_CHECK_FUNC([expf], [],[AC_MSG_ERROR(Could not use expf())],)
AC_CHECK_FUNC([cargf], [],[AC_MSG_ERROR(Could not use cargf())],)
AC_CHECK_FUNC([cexpf], [],[AC_MSG_ERROR(Could not use cexpf())],)
AC_CHECK_FUNC([crealf], [],[AC_MSG_ERROR(Could not use crealf())],)
AC_CHECK_FUNC([cimagf], [],[AC_MSG_ERROR(Could not use cimagf())],)
AC_CHECK_FUNC([sqrtf], [],[AC_MSG_ERROR(Could not use sqrtf())],)

# Check for necessary header files
AC_CHECK_HEADERS([stdio.h stdlib.h complex.h string.h getopt.h sys/resource.h float.h inttypes.h limits.h stdlib.h string.h unistd.h])
Expand Down