Changeset 3097


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

Ticket #1009: Support for IPP 6.1 on Linux

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r3062 r3097  
    704704enable_libsamplerate 
    705705enable_ipp 
    706 enable_ipp_samples 
     706with_ipp 
     707with_ipp_samples 
     708with_ipp_arch 
    707709enable_ssl 
    708710' 
     
    13571359                          IPPSAMPLES env var or with --with-ipp and 
    13581360                          --with-ipp-samples options 
    1359   --with-ipp=DIR          Specify the Intel IPP location 
    1360   --with-ipp-samples=DIR  Specify the Intel IPP samples location 
    13611361  --disable-ssl           Exclude SSL support the build (default: autodetect) 
    13621362 
     
    13801380                          (hint: use CFLAGS and LDFLAGS env var to set the 
    13811381                          include/lib paths) 
     1382  --with-ipp=DIR          Specify the Intel IPP location 
     1383  --with-ipp-samples=DIR  Specify the Intel IPP samples location 
     1384  --with-ipp-arch=ARCH    Specify the Intel IPP ARCH suffix, e.g. "64" or 
     1385                          "em64t" 
    13821386 
    13831387Some influential environment variables: 
     
    56385642 
    56395643 
    5640 # Check whether --enable-ipp was given. 
    5641 if test "${enable_ipp+set}" = set; then : 
    5642   enableval=$enable_ipp; 
     5644 
     5645# Check whether --with-ipp was given. 
     5646if test "${with_ipp+set}" = set; then : 
     5647  withval=$with_ipp; 
    56435648else 
    56445649  with_ipp=no 
     
    56475652 
    56485653 
    5649 # Check whether --enable-ipp-samples was given. 
    5650 if test "${enable_ipp_samples+set}" = set; then : 
    5651   enableval=$enable_ipp_samples; 
     5654 
     5655# Check whether --with-ipp-samples was given. 
     5656if test "${with_ipp_samples+set}" = set; then : 
     5657  withval=$with_ipp_samples; 
    56525658else 
    56535659  with_ipp_samples=no 
     5660 
     5661fi 
     5662 
     5663 
     5664 
     5665# Check whether --with-ipp-arch was given. 
     5666if test "${with_ipp_arch+set}" = set; then : 
     5667  withval=$with_ipp_arch; 
     5668else 
     5669  with_ipp_arch=no 
    56545670 
    56555671fi 
     
    56755691    fi 
    56765692 
     5693    if test "x$with_ipp_arch" != "xno"; then 
     5694        IPP_SUFFIX="em64t" 
     5695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to $IPP_SUFFIX" >&5 
     5696$as_echo "IPP arch suffix is set to $IPP_SUFFIX" >&6; } 
     5697    else 
     5698        IPP_SUFFIX="" 
     5699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to empty" >&5 
     5700$as_echo "IPP arch suffix is set to empty" >&6; } 
     5701    fi 
     5702 
    56775703    if test x$IPPROOT = x; then 
    56785704        as_fn_error "the location is neither specified nor can be guessed. Please specify with IPPROOT env var or with --with-ipp option" "$LINENO" 5 
     
    56845710        # IPP directory looks okay. 
    56855711        # Remove trailing backslash 
    5686         IPPROOT=`echo $IPPROOT/ | sed 's/\/$//'` 
     5712        IPPROOT=`echo $IPPROOT | sed 's/\/$//'` 
    56875713 
    56885714        SAVED_CFLAGS="$CFLAGS" 
     
    56925718        IPP_CFLAGS="-I$IPPROOT/include" 
    56935719        IPP_LDFLAGS="-L$IPPROOT/sharedlib" 
    5694         IPP_LIBS="-lippsc -lipps -lippsr -lippcore -lguide" 
     5720        IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippsr${IPP_SUFFIX} -lippcore${IPP_SUFFIX} -lguide" 
    56955721        #IPP_LDFLAGS="-L$IPPROOT/sharedlib" 
    56965722        #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" 
     
    57215747  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
    57225748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    5723 as_fn_error "failed 
    5724 See \`config.log' for more details." "$LINENO" 5; } 
     5749{ as_fn_set_status run with --help for more info 
     5750as_fn_error "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly 
     5751See \`config.log' for more details." "$LINENO" 5; }; } 
    57255752fi 
    57265753rm -f core conftest.err conftest.$ac_objext \ 
     
    57605787        IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` 
    57615788 
    5762         # Guess the libusc.a build location 
     5789        # Guess the libusc.a/libspeech.a build location 
    57635790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC build location" >&5 
    57645791$as_echo_n "checking Intel IPP USC build location... " >&6; } 
    5765         IPPSAMPLESLIB=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` 
    5766         if test ! -d $IPPSAMPLESLIB; then 
     5792        if test -d $IPPSAMPLES/speech-codecs/bin; then 
     5793            IPPVER=5 
     5794            IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` 
     5795        elif test -d $IPPSAMPLES/speech-codecs/_bin; then 
     5796            IPPVER=6 
     5797            IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` 
     5798        else 
    57675799            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
    57685800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    5769 as_fn_error "the $IPPSAMPLES/speech-codecs/bin/*gcc*/lib directory not found. Have you built the samples? 
     5801as_fn_error "unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples? 
    57705802See \`config.log' for more details." "$LINENO" 5; } 
    57715803        fi 
    5772         if test ! -f $IPPSAMPLESLIB/libusc.a; then 
     5804 
     5805        # Test the directory 
     5806        if test ! -d $IPPSAMP_DIR; then 
    57735807            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
    57745808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    5775 as_fn_error "libusc.a doesn't exist in $IPPSAMPLESLIB 
     5809as_fn_error "There's something wrong with this script, directory $IPPSAMP_DIR does not exist 
     5810See \`config.log' for more details." "$LINENO" 5; } 
     5811            exit 1; 
     5812        fi 
     5813 
     5814        if test "x$IPPVER" = "x5"; then 
     5815            IPPSAMP_LIBS="libusc.a" 
     5816            IPPSAMP_LDLIBS="-lusc" 
     5817        elif test "x$IPPVER" = "x6"; then 
     5818            IPPSAMP_LIBS="libspeech.a" 
     5819            IPPSAMP_LDLIBS="-lspeech" 
     5820        else 
     5821            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
     5822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
     5823as_fn_error "bug in this script: unsupported IPP version 
    57765824See \`config.log' for more details." "$LINENO" 5; } 
    57775825        fi 
    5778         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPPSAMPLESLIB" >&5 
    5779 $as_echo "$IPPSAMPLESLIB" >&6; } 
     5826 
     5827        if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then 
     5828            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 
     5829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
     5830as_fn_error "$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR 
     5831See \`config.log' for more details." "$LINENO" 5; } 
     5832        fi 
     5833 
     5834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPPSAMP_DIR" >&5 
     5835$as_echo "$IPPSAMP_DIR" >&6; } 
    57805836 
    57815837        SAVED_CFLAGS="$CFLAGS" 
     
    57835839        SAVED_LIBS="$LIBS" 
    57845840 
    5785         IPPSAMPLESINC="-I$IPPSAMPLES/speech-codecs/core/usc/include" 
    5786         CFLAGS="$CFLAGS $IPPSAMPLESINC" 
    5787         LDFLAGS="$LDFLAGS -L$IPPSAMPLESLIB" 
    5788         LIBS="-lusc $LIBS" 
     5841        IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" 
     5842        CFLAGS="$CFLAGS $IPPSAMP_INC" 
     5843        LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" 
     5844        LIBS="$IPPSAMP_LDLIBS $LIBS" 
    57895845 
    57905846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC usability" >&5 
     
    58155871 
    58165872        CFLAGS="$SAVED_CFLAGS" 
    5817         LDFLAGS="\$(IPP_LDFLAGS) $SAVED_LDFLAGS" 
    5818         LIBS="\$(IPP_LIBS) $SAVED_LIBS" 
    5819  
    5820         IPP_CFLAGS="$IPP_CFLAGS $IPPSAMPLESINC" 
    5821         IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMPLESLIB" 
    5822         IPP_LIBS="-lusc $IPP_LIBS" 
     5873        LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" 
     5874        LIBS="$IPP_LIBS $SAVED_LIBS" 
     5875 
     5876        IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" 
     5877        IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" 
     5878        IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" 
    58235879    fi 
     5880 
     5881    CFLAGS="$CFLAGS $IPP_CFLAGS" 
     5882    LDFLAGS="$LDFLAGS $IPP_LDFLAGS" 
     5883    LIBS="$LIBS $IPP_LIBS" 
    58245884 
    58255885    ac_build_mak_vars="$ac_build_mak_vars\n\ 
  • 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.