Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3105 in orxonox.OLD for orxonox/branches/images/configure.ac


Ignore:
Timestamp:
Dec 5, 2004, 5:34:52 PM (21 years ago)
Author:
bensch
Message:

orxonox/branches/images: test also in configure.ac-script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/configure.ac

    r3104 r3105  
    2020AC_PROG_CXX
    2121AC_HEADER_STDC
     22
     23
     24### CHECKING  OPTIONAT ARGUMENTS
     25## GTK-disabled
     26def_gtk=yes
     27AC_MSG_CHECKING([if gtk should be enabled])
     28AC_ARG_ENABLE([gtk],
     29        AC_HELP_STRING( [--disable-gtk],
     30        [Prevents GTK from being loaded]), [def_gtk=no])
     31if test "$def_gtk" = yes; then
     32  echo "yes"
     33fi
     34if test "$def_gtk" = no; then
     35  echo "no"
     36fi
     37### SDL_image-disable
     38def_sdl_image=yes
     39AC_MSG_CHECKING([if SDL_image should be enabled])
     40AC_ARG_ENABLE([sdl_image],
     41        AC_HELP_STRING( [--disabel-sdl-image],
     42        [Prevents SDL_image from being loaded]), [def_sdl_image=no])
     43if test "$def_sdl_image" = yes; then
     44  echo "yes"
     45fi
     46if test "$def_sdl_image" = no; then
     47  echo "no"
     48fi
    2249
    2350### CHECKING FOR SYSTEM ###
     
    99126    fi
    100127
    101 
     128    def_sdl_image=no;
    102129    ;;
    103130
     
    155182     fi   
    156183
     184## check for SDL_Image
     185if test "$def_sdl_image" = "yes"; then
    157186# checking for SDL_image-headers
    158187  AC_CHECK_HEADERS(SDL/SDL_image.h ,,
    159       [AC_MSG_ERROR([cannot find SDL_image headers]) ])
     188      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
     189fi
     190if test "$def_sdl_image" = "yes"; then
    160191# checking for SDL_image-lib
    161192  AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)
     
    169200        exit -1
    170201     fi   
     202fi
    171203
    172204## checking for SDL
     
    210242       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    211243       LIBS="$LIBS $SDL_LIBS"
     244
     245       def_sdl_image=no;
    212246    ;;
    213247
     
    218252AC_SUBST(MSBITFIELDS)
    219253
    220 ## checking for libjpeg
    221 AC_CHECK_HEADERS(jpeglib.h ,,
     254if test "$def_sdl_image" = "no"; then
     255 ## checking for libjpeg
     256 AC_CHECK_HEADERS(jpeglib.h ,,
    222257        [AC_MSG_ERROR([cannot find jpeg headers]) ])
    223258
    224 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)
     259 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)
    225260    if test "$FOUND_jpeg" = "yes" ; then
    226261      LIBS="$LIBS -ljpeg"
     
    234269
    235270
    236 ## checking for libpng
    237 AC_CHECK_HEADERS(png.h ,,
     271 ## checking for libpng
     272 AC_CHECK_HEADERS(png.h ,,
    238273        [AC_MSG_ERROR([cannot find jpeg headers]) ])
    239274
    240 AC_CHECK_LIB([png], [main], FOUND_png=yes)
     275 AC_CHECK_LIB([png], [main], FOUND_png=yes)
    241276    if test "$FOUND_png" = "yes" ; then
    242277      LIBS="$LIBS -lpng"
     
    248283         exit -1
    249284    fi   
    250 
     285fi
    251286
    252287## checking for GTK
    253 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     288if test "$def_gtk" = yes; then
     289
     290        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     291        AC_MSG_CHECKING([for gtk2.0])
     292        if `pkg-config --exists gtk+-2.0`; then
     293                echo "yes"
     294                have_gtk2=yes
     295                GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     296                GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     297                AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
     298        else
     299                echo "no"
     300        fi
     301
     302fi
    254303AC_SUBST(GTK2_LIBS)
    255304AC_SUBST(GTK2_CFLAGS)
    256 AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes)
     305AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
     306
    257307
    258308
     
    267317 AC_CHECK_LIB([m], [main])
    268318
    269 
     319 
    270320# Checks for header files.
    271321AC_HEADER_STDC
Note: See TracChangeset for help on using the changeset viewer.