Changeset 3105 in orxonox.OLD for orxonox/branches/images/configure.ac
- Timestamp:
- Dec 5, 2004, 5:34:52 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/configure.ac
r3104 r3105 20 20 AC_PROG_CXX 21 21 AC_HEADER_STDC 22 23 24 ### CHECKING OPTIONAT ARGUMENTS 25 ## GTK-disabled 26 def_gtk=yes 27 AC_MSG_CHECKING([if gtk should be enabled]) 28 AC_ARG_ENABLE([gtk], 29 AC_HELP_STRING( [--disable-gtk], 30 [Prevents GTK from being loaded]), [def_gtk=no]) 31 if test "$def_gtk" = yes; then 32 echo "yes" 33 fi 34 if test "$def_gtk" = no; then 35 echo "no" 36 fi 37 ### SDL_image-disable 38 def_sdl_image=yes 39 AC_MSG_CHECKING([if SDL_image should be enabled]) 40 AC_ARG_ENABLE([sdl_image], 41 AC_HELP_STRING( [--disabel-sdl-image], 42 [Prevents SDL_image from being loaded]), [def_sdl_image=no]) 43 if test "$def_sdl_image" = yes; then 44 echo "yes" 45 fi 46 if test "$def_sdl_image" = no; then 47 echo "no" 48 fi 22 49 23 50 ### CHECKING FOR SYSTEM ### … … 99 126 fi 100 127 101 128 def_sdl_image=no; 102 129 ;; 103 130 … … 155 182 fi 156 183 184 ## check for SDL_Image 185 if test "$def_sdl_image" = "yes"; then 157 186 # checking for SDL_image-headers 158 187 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 ]) 189 fi 190 if test "$def_sdl_image" = "yes"; then 160 191 # checking for SDL_image-lib 161 192 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes) … … 169 200 exit -1 170 201 fi 202 fi 171 203 172 204 ## checking for SDL … … 210 242 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 211 243 LIBS="$LIBS $SDL_LIBS" 244 245 def_sdl_image=no; 212 246 ;; 213 247 … … 218 252 AC_SUBST(MSBITFIELDS) 219 253 220 ## checking for libjpeg 221 AC_CHECK_HEADERS(jpeglib.h ,, 254 if test "$def_sdl_image" = "no"; then 255 ## checking for libjpeg 256 AC_CHECK_HEADERS(jpeglib.h ,, 222 257 [AC_MSG_ERROR([cannot find jpeg headers]) ]) 223 258 224 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)259 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes) 225 260 if test "$FOUND_jpeg" = "yes" ; then 226 261 LIBS="$LIBS -ljpeg" … … 234 269 235 270 236 ## checking for libpng237 AC_CHECK_HEADERS(png.h ,,271 ## checking for libpng 272 AC_CHECK_HEADERS(png.h ,, 238 273 [AC_MSG_ERROR([cannot find jpeg headers]) ]) 239 274 240 AC_CHECK_LIB([png], [main], FOUND_png=yes)275 AC_CHECK_LIB([png], [main], FOUND_png=yes) 241 276 if test "$FOUND_png" = "yes" ; then 242 277 LIBS="$LIBS -lpng" … … 248 283 exit -1 249 284 fi 250 285 fi 251 286 252 287 ## 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) 288 if 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 302 fi 254 303 AC_SUBST(GTK2_LIBS) 255 304 AC_SUBST(GTK2_CFLAGS) 256 AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes) 305 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) 306 257 307 258 308 … … 267 317 AC_CHECK_LIB([m], [main]) 268 318 269 319 270 320 # Checks for header files. 271 321 AC_HEADER_STDC
Note: See TracChangeset
for help on using the changeset viewer.