X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=config%2Famanda%2Flibs.m4;h=1cee766753bca0f603fef60bca5ddb450506dcb9;hb=2451141bb42e8e8d981b4843ea73f719fd544a22;hp=1c3ae6cb92ee06dafc3c7e87fed0f8c122ff3bf2;hpb=79cdc4b6ea8848b21ba4a0e7d2fd3bc401e0bebe;p=debian%2Famanda diff --git a/config/amanda/libs.m4 b/config/amanda/libs.m4 index 1c3ae6c..1cee766 100644 --- a/config/amanda/libs.m4 +++ b/config/amanda/libs.m4 @@ -17,30 +17,28 @@ # the libcurl distribution for details. # AC_DEFUN([AMANDA_CHECK_LIBCURL], [ - case "$target" in - sparc-sun-solaris2.10) # Solaris 10 - # curl is not in the LD_LIBRARY_PATH on Solaris 10, so we search - # for it in a few common paths; we then extract the -L flags and - # translate them to -R flags, as required by the runtime linker. - AC_PATH_PROG(CURL_CONFIG, curl-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin) - if test -n "$CURL_CONFIG"; then - curlflags=`$CURL_CONFIG --libs 2>/dev/null` - for flag in curlflags; do - case $flag in - -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;; - esac - done - fi - ;; - esac - LIBCURL_CHECK_CONFIG(yes, 7.10.0, HAVE_CURL=yes, HAVE_CURL=no) if test x"$HAVE_CURL" = x"yes"; then AMANDA_ADD_LIBS($LIBCURL) AMANDA_ADD_CPPFLAGS($LIBCURL_CPPFLAGS) AMANDA_CHECK_TYPE([curl_off_t], [off_t], [curl/curl.h]) + case "$host" in + *sun-solaris2*) # Solaris, all versions. + # we extract the -L flags and translate them to -R flags, as required + # by the runtime linker. + if test -n "$_libcurl_config"; then + curlflags=`$_libcurl_config --libs 2>/dev/null` + for flag in curlflags; do + case $flag in + -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;; + esac + done + fi + ;; + esac fi + ]) # SYNOPSIS @@ -76,7 +74,7 @@ AC_DEFUN([AMANDA_CHECK_HMAC], [ # AC_DEFUN([AMANDA_CHECK_NET_LIBS], [ # Make sure we don't use -lnsl and -lsun on Irix systems. - case "$target" in + case "$host" in *sgi-irix*) AC_CHECK_LIB(socket,main) ;; @@ -100,26 +98,45 @@ AC_DEFUN([AMANDA_CHECK_NET_LIBS], [ # "out of the box" on more boxes. # AC_DEFUN([AMANDA_CHECK_GLIB], [ - # search for pkg-config, which the glib configuration uses, adding a few - # system-specific search paths. - AC_PATH_PROG(PKG_CONFIG, pkg-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin) - - case "$target" in - sparc-sun-solaris2.8) # Solaris 8 - # give the linker a runtime search path; pkg-config doesn't supply this. - # Users could also specify this with LD_LIBRARY_PATH to both ./configure - # and make. Adding this support here makes straight './configure; make' - # "just work" on Solaris 8 - if test -n "$PKG_CONFIG"; then - glib_R_flag=`$PKG_CONFIG glib-2.0 --libs-only-L 2>/dev/null | sed -e 's/-L/-R/g'` - LDFLAGS="$LDFLAGS $glib_R_flag" - fi - ;; - esac + AC_ARG_VAR(GLIB_CFLAGS, [CFLAGS to build with glib; disables use of pkg-config]) + AC_ARG_VAR(GLIB_LIBS, [libraries to build with glib; disables use of pkg-config]) + AC_ARG_VAR(GLIB_GENMARSHAL, [genmarshal binary to use with glib; disables use of pkg-config]) + AC_ARG_VAR(GOBJECT_QUERY, [gobject_query binary to use with glib; disables use of pkg-config]) + AC_ARG_VAR(GLIB_MKENUMS, [mkenums binary to use with glib; disables use of pkg-config]) + + # if any of the precious variables are set, disable the pkg-config run + explicit_glib=no + test x"$GLIB_CFLAGS" = x"" || explicit_glib=yes + test x"$GLIB_LIBS" = x"" || explicit_glib=yes + test x"$GLIB_GENMARSHAL" = x"" || explicit_glib=yes + test x"$GOBJECT_QUERY" = x"" || explicit_glib=yes + test x"$GLIB_MKENUMS" = x"" || explicit_glib=yes + + if test x"$explicit_glib" = x"no"; then + # search for pkg-config, which the glib configuration uses, adding a few + # system-specific search paths. + AC_PATH_PROG(PKG_CONFIG, pkg-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin) + + case "$host" in + sparc-sun-solaris2.8) # Solaris 8 + # give the linker a runtime search path; pkg-config doesn't supply this. + # Users could also specify this with LD_LIBRARY_PATH to both ./configure + # and make. Adding this support here makes straight './configure; make' + # "just work" on Solaris 8 + if test -n "$PKG_CONFIG"; then + glib_R_flag=`$PKG_CONFIG glib-2.0 --libs-only-L 2>/dev/null | sed -e 's/-L/-R/g'` + LDFLAGS="$LDFLAGS $glib_R_flag" + fi + ;; + esac + + AM_PATH_GLIB_2_0(2.2.0,,[ + AC_MSG_ERROR(glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help) + ], gmodule gobject gthread) + else + AC_MSG_ERROR(explicit glib) + fi - AM_PATH_GLIB_2_0(2.2.0,,[ - AC_MSG_ERROR(glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help) - ], gmodule gobject gthread) # GLIB_CPPFLAGS is not set by autoconf, yet GLIB_CFLAGS contains what GLIB_CPPFLAGS should contain. AMANDA_ADD_CPPFLAGS($GLIB_CFLAGS) AMANDA_ADD_LIBS($GLIB_LIBS) @@ -194,7 +211,8 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP]) AC_ARG_WITH(libcurl, - AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]), + AC_HELP_STRING([--with-libcurl=PREFIX], + [look for the curl library in PREFIX/lib and headers in PREFIX/include]), [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])]) if test "$_libcurl_with" != "no" ; then @@ -208,9 +226,9 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], if test -d "$_libcurl_with" ; then LIBCURL_CPPFLAGS="-I$withval/include" _libcurl_ldflags="-L$withval/lib" - AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"],["$withval/bin"]) + AC_PATH_PROG([_libcurl_config],[curl-config],[],["$withval/bin"]) else - AC_PATH_PROG([_libcurl_config],[curl-config]) + AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH]) fi if test x$_libcurl_config != "x" ; then