Changeset 698

Show
Ignore:
Timestamp:
11/11/06 10:18:29 (2 years ago)
Author:
common
Message:

nepenthes

  • configure.ac
    • use curl-config to get all required flags when linking curl (uclibc fix)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/configure.ac

    r686 r698  
    345345 
    346346if test xyes = "xyes"; then 
    347     orig_cppflags=$CPPFLAGS 
    348    
     347 
     348    AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) 
     349    if test "$LIBCURL_CONFIG" = "no" ; then 
     350        AC_MSG_ERROR([libcurl curl-config was not found in PATH]) 
     351    fi 
     352 
     353 
    349354    if test "x$curl_inc" != xno; then 
    350355      CPPFLAGS="-I$curl_inc $CPPFLAGS" 
    351356    fi 
    352357 
    353     orig_ldflags=$LDFLAGS 
    354358    if test "x$curl_lib" != "xno"; then 
    355359        LDFLAGS="-L$curl_lib $LDFLAGS" 
    356360    fi 
     361 
     362    orig_cppflags=$CPPFLAGS 
     363    orig_libs=$LIBS 
     364     
     365    CPPFLAGS="$CPPFLAGS `curl-config --cflags`" 
     366    LIBS="$LIBS `curl-config --libs`" 
     367     
    357368 
    358369    AC_CHECK_LIB([curl], [curl_version], 
    359370             [AC_DEFINE(HAVE_LIBCURL, 1, 
    360371                       [Define if you want to use libcurl]) 
    361              LIB_CURL="-lcurl"], 
     372             LIB_CURL="`curl-config --cflags`"], 
    362373             [AC_MSG_ERROR([libcurl is missing - install it please]) 
    363374             ]) 
     375 
     376    CPPFLAGS=$orig_cppflags 
     377    LIBS=$orig_libs 
    364378fi 
    365379           
     
    425439    fi 
    426440 
     441     
     442    orig_libs=$LIBS 
     443    LIBS="-lz $LIBS" 
    427444 
    428445    AC_CHECK_LIB([magic], [magic_open], 
    429446             [AC_DEFINE(HAVE_LIBMAGIC, 1, 
    430447                       [Define if you want to use libmagic]) 
    431               LIB_MAGIC="-lmagic"], 
     448              LIB_MAGIC="-lmagic -lz"], 
    432449             [AC_MSG_ERROR([libmagic is missing - install it please]) 
    433450             ]) 
     451 
     452    LIBS=$orig_libs 
     453 
    434454    AC_CHECK_HEADERS(magic.h) 
    435455fi