Ignore:
Timestamp:
Feb 10, 2010 6:46:05 PM (14 years ago)
Author:
bennylp
Message:

Ticket #1009: Support for IPP 6.1 on Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r3062 r3097  
    668668    ) 
    669669 
    670 AC_ARG_ENABLE(ipp, 
     670AC_ARG_WITH(ipp, 
    671671    AC_HELP_STRING([--with-ipp=DIR], 
    672672                   [Specify the Intel IPP location]), 
     
    675675    ) 
    676676 
    677 AC_ARG_ENABLE(ipp-samples, 
     677AC_ARG_WITH(ipp-samples, 
    678678    AC_HELP_STRING([--with-ipp-samples=DIR], 
    679679                   [Specify the Intel IPP samples location]), 
    680680    [], 
    681681    [with_ipp_samples=no] 
     682    ) 
     683 
     684AC_ARG_WITH(ipp-arch, 
     685    AC_HELP_STRING([--with-ipp-arch=ARCH], 
     686                   [Specify the Intel IPP ARCH suffix, e.g. "64" or "em64t. Default is blank for IA32"]), 
     687    [], 
     688    [with_ipp_arch=no] 
    682689    ) 
    683690 
     
    698705    else 
    699706        AC_MSG_RESULT([$IPPROOT]) 
     707    fi 
     708 
     709    if test "x$with_ipp_arch" != "xno"; then 
     710        IPP_SUFFIX="em64t" 
     711        AC_MSG_RESULT([IPP arch suffix is set to $IPP_SUFFIX]) 
     712    else 
     713        IPP_SUFFIX="" 
     714        AC_MSG_RESULT([IPP arch suffix is set to empty]) 
    700715    fi 
    701716 
     
    709724        # IPP directory looks okay. 
    710725        # Remove trailing backslash 
    711         IPPROOT=`echo $IPPROOT/ | sed 's/\/$//'` 
     726        IPPROOT=`echo $IPPROOT | sed 's/\/$//'` 
    712727 
    713728        SAVED_CFLAGS="$CFLAGS" 
     
    717732        IPP_CFLAGS="-I$IPPROOT/include" 
    718733        IPP_LDFLAGS="-L$IPPROOT/sharedlib" 
    719         IPP_LIBS="-lippsc -lipps -lippsr -lippcore -lguide" 
     734        IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippsr${IPP_SUFFIX} -lippcore${IPP_SUFFIX} -lguide" 
    720735        #IPP_LDFLAGS="-L$IPPROOT/sharedlib" 
    721736        #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" 
     
    731746                                           [ippStaticInit();])], 
    732747                  [AC_MSG_RESULT(ok)], 
    733                   [AC_MSG_FAILURE(failed)]) 
     748                  [AC_MSG_FAILURE(Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info)]) 
    734749 
    735750        CFLAGS="$SAVED_CFLAGS" 
     
    764779        # Remove trailing backslash 
    765780        IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` 
    766  
    767         # Guess the libusc.a build location 
     781         
     782        # Guess the libusc.a/libspeech.a build location 
    768783        AC_MSG_CHECKING([Intel IPP USC build location]) 
    769         IPPSAMPLESLIB=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` 
    770         if test ! -d $IPPSAMPLESLIB; then 
    771             AC_MSG_FAILURE([the $IPPSAMPLES/speech-codecs/bin/*gcc*/lib directory not found. Have you built the samples?]) 
    772         fi 
    773         if test ! -f $IPPSAMPLESLIB/libusc.a; then 
    774             AC_MSG_FAILURE([libusc.a doesn't exist in $IPPSAMPLESLIB]) 
    775         fi 
    776         AC_MSG_RESULT([$IPPSAMPLESLIB]) 
     784        if test -d $IPPSAMPLES/speech-codecs/bin; then 
     785            IPPVER=5  
     786            IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` 
     787        elif test -d $IPPSAMPLES/speech-codecs/_bin; then 
     788            IPPVER=6 
     789            IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` 
     790        else 
     791            AC_MSG_FAILURE([unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples?]) 
     792        fi 
     793 
     794        # Test the directory 
     795        if test ! -d $IPPSAMP_DIR; then 
     796            AC_MSG_FAILURE([There's something wrong with this script, directory $IPPSAMP_DIR does not exist]) 
     797            exit 1; 
     798        fi 
     799 
     800        if test "x$IPPVER" = "x5"; then 
     801            IPPSAMP_LIBS="libusc.a" 
     802            IPPSAMP_LDLIBS="-lusc" 
     803        elif test "x$IPPVER" = "x6"; then 
     804            IPPSAMP_LIBS="libspeech.a" 
     805            IPPSAMP_LDLIBS="-lspeech" 
     806        else 
     807            AC_MSG_FAILURE([bug in this script: unsupported IPP version]) 
     808        fi 
     809 
     810        if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then 
     811            AC_MSG_FAILURE([$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR]) 
     812        fi 
     813 
     814        AC_MSG_RESULT([$IPPSAMP_DIR]) 
    777815 
    778816        SAVED_CFLAGS="$CFLAGS" 
     
    780818        SAVED_LIBS="$LIBS" 
    781819 
    782         IPPSAMPLESINC="-I$IPPSAMPLES/speech-codecs/core/usc/include" 
    783         CFLAGS="$CFLAGS $IPPSAMPLESINC" 
    784         LDFLAGS="$LDFLAGS -L$IPPSAMPLESLIB" 
    785         LIBS="-lusc $LIBS" 
     820        IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" 
     821        CFLAGS="$CFLAGS $IPPSAMP_INC" 
     822        LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" 
     823        LIBS="$IPPSAMP_LDLIBS $LIBS" 
    786824 
    787825        AC_MSG_CHECKING([Intel IPP USC usability]) 
     
    793831 
    794832        CFLAGS="$SAVED_CFLAGS" 
    795         LDFLAGS="\$(IPP_LDFLAGS) $SAVED_LDFLAGS" 
    796         LIBS="\$(IPP_LIBS) $SAVED_LIBS" 
    797  
    798         IPP_CFLAGS="$IPP_CFLAGS $IPPSAMPLESINC" 
    799         IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMPLESLIB" 
    800         IPP_LIBS="-lusc $IPP_LIBS" 
     833        LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" 
     834        LIBS="$IPP_LIBS $SAVED_LIBS" 
     835 
     836        IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" 
     837        IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" 
     838        IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" 
    801839    fi 
     840 
     841    CFLAGS="$CFLAGS $IPP_CFLAGS" 
     842    LDFLAGS="$LDFLAGS $IPP_LDFLAGS" 
     843    LIBS="$LIBS $IPP_LIBS" 
    802844 
    803845    ac_build_mak_vars="$ac_build_mak_vars\n\ 
Note: See TracChangeset for help on using the changeset viewer.