Ignore:
Timestamp:
Jun 1, 2012 4:27:01 AM (12 years ago)
Author:
ming
Message:

Fixed #1525: Modify configure script to disable autodetection when cross-compiling.

This fix disable autodetection for:

  • SDL
  • ffmpeg
  • SSL
  • OpenCORE AMR-NB
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r4131 r4149  
    105105        ;; 
    106106esac 
     107 
     108AC_SUBST(ac_cross_compile) 
     109if test "$build" = "$host"; then 
     110    ac_cross_compile= 
     111else 
     112    ac_cross_compile=${host_orig}- 
     113fi 
    107114 
    108115AC_CHECK_LIB(pthread,pthread_create) 
     
    831838    ) 
    832839 
     840dnl # Do not use default SDL installation if we are cross-compiling 
     841if test "x$ac_cross_compile" != "x" -a "x$with_sdl" = "xno"; then 
     842    enable_sdl=no 
     843fi 
     844 
    833845dnl # SDL 
    834846AC_ARG_ENABLE(sdl, 
     
    860872              ]) 
    861873 
     874 
     875AC_ARG_WITH(ffmpeg, 
     876    AC_HELP_STRING([--with-ffmpeg=DIR], 
     877                   [Specify alternate FFMPEG prefix]), 
     878    [], 
     879    [with_ffmpeg=no] 
     880    ) 
     881 
     882dnl # Do not use default ffmpeg installation if we are cross-compiling 
     883if test "x$ac_cross_compile" != "x" -a "x$with_ffmpeg" = "xno"; then 
     884    enable_ffmpeg=no 
     885fi 
    862886 
    863887dnl # FFMPEG stuffs 
     
    9841008              ) 
    9851009 
    986 AC_ARG_WITH(ffmpeg, 
    987     AC_HELP_STRING([--with-ffmpeg=DIR], 
    988                    [Specify alternate FFMPEG prefix]), 
    989     [], 
    990     [with_ffmpeg=no] 
    991     ) 
    992  
    993  
    9941010dnl # Video for Linux 2 
    9951011AC_ARG_ENABLE(v4l2, 
     
    12541270dnl # 
    12551271 
     1272dnl # SSL alt prefix 
     1273AC_ARG_WITH(ssl, 
     1274    AC_HELP_STRING([--with-ssl=DIR], 
     1275                   [Specify alternate libssl prefix]), 
     1276    [], 
     1277    [with_ssl=no] 
     1278    ) 
     1279 
     1280dnl # Do not use default SSL installation if we are cross-compiling 
     1281if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno"; then 
     1282    enable_ssl=no 
     1283fi 
     1284 
    12561285dnl # Include SSL support 
    12571286AC_SUBST(ac_no_ssl) 
     
    12681297              [ 
    12691298                AC_MSG_RESULT([checking for OpenSSL installations..]) 
     1299                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 
     1300                    CFLAGS="$CFLAGS -I$with_ssl/include" 
     1301                    LDFLAGS="$LDFLAGS -L$with_ssl/lib" 
     1302                    AC_MSG_RESULT([Using SSL prefix... $with_ssl]) 
     1303                fi 
    12701304                AC_SUBST(openssl_h_present) 
    12711305                AC_SUBST(libssl_present) 
     
    12841318              ]) 
    12851319 
     1320dnl # opencore-amrnb alt prefix 
     1321AC_ARG_WITH(opencore-amrnb, 
     1322    AC_HELP_STRING([--with-opencore-amrnb=DIR], 
     1323                   [Specify alternate libopencore-amrnb prefix]), 
     1324    [], 
     1325    [with_opencore_amrnb=no] 
     1326    ) 
     1327 
     1328dnl # Do not use default opencore-amrnb installation if we are cross-compiling 
     1329if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrnb" = "xno"; then 
     1330    enable_opencore_amrnb=no 
     1331fi 
     1332 
    12861333dnl # Include opencore-amrnb support 
    12871334AC_SUBST(ac_no_opencore_amrnb) 
     
    12991346              [ 
    13001347                AC_MSG_RESULT([checking for OpenCORE AMR-NB installations..]) 
     1348                if test "x$with_opencore_amrnb" != "xno" -a "x$with_opencore_amrnb" != "x"; then 
     1349                    CFLAGS="$CFLAGS -I$with_opencore_amrnb/include" 
     1350                    LDFLAGS="$LDFLAGS -L$with_opencore_amrnb/lib" 
     1351                    AC_MSG_RESULT([Using OpenCORE AMR-NB prefix... $with_opencore_amrnb]) 
     1352                fi                 
    13011353                AC_SUBST(opencore_amrnb_h_present) 
    13021354                AC_SUBST(opencore_amrnb_present) 
     
    13811433 
    13821434AC_SUBST(target) 
    1383 AC_SUBST(ac_cross_compile) 
    1384 if test "$build" = "$host"; then 
    1385     ac_cross_compile= 
    1386 else 
    1387     ac_cross_compile=${host_orig}- 
    1388 fi 
    13891435AC_SUBST(ac_linux_poll,select) 
    13901436AC_SUBST(ac_host,unix) 
Note: See TracChangeset for help on using the changeset viewer.