Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3098 in orxonox.OLD for orxonox/branches/images/configure


Ignore:
Timestamp:
Dec 5, 2004, 4:05:57 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/images: libPNG included, and also a routine to read it, but this one is not the best i Could find.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/configure

    r3086 r3098  
    60216021         echo "jpeg library not found."
    60226022         echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
     6023         echo "------------------"
     6024         exit -1
     6025    fi
     6026
     6027
     6028## checking for libpng
     6029
     6030for ac_header in png.h
     6031do
     6032as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     6033if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6034  echo "$as_me:$LINENO: checking for $ac_header" >&5
     6035echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6036if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6037  echo $ECHO_N "(cached) $ECHO_C" >&6
     6038fi
     6039echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6040echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6041else
     6042  # Is the header compilable?
     6043echo "$as_me:$LINENO: checking $ac_header usability" >&5
     6044echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     6045cat >conftest.$ac_ext <<_ACEOF
     6046/* confdefs.h.  */
     6047_ACEOF
     6048cat confdefs.h >>conftest.$ac_ext
     6049cat >>conftest.$ac_ext <<_ACEOF
     6050/* end confdefs.h.  */
     6051$ac_includes_default
     6052#include <$ac_header>
     6053_ACEOF
     6054rm -f conftest.$ac_objext
     6055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6056  (eval $ac_compile) 2>conftest.er1
     6057  ac_status=$?
     6058  grep -v '^ *+' conftest.er1 >conftest.err
     6059  rm -f conftest.er1
     6060  cat conftest.err >&5
     6061  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6062  (exit $ac_status); } &&
     6063         { ac_try='test -z "$ac_c_werror_flag"
     6064                         || test ! -s conftest.err'
     6065  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6066  (eval $ac_try) 2>&5
     6067  ac_status=$?
     6068  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6069  (exit $ac_status); }; } &&
     6070         { ac_try='test -s conftest.$ac_objext'
     6071  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6072  (eval $ac_try) 2>&5
     6073  ac_status=$?
     6074  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6075  (exit $ac_status); }; }; then
     6076  ac_header_compiler=yes
     6077else
     6078  echo "$as_me: failed program was:" >&5
     6079sed 's/^/| /' conftest.$ac_ext >&5
     6080
     6081ac_header_compiler=no
     6082fi
     6083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     6084echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6085echo "${ECHO_T}$ac_header_compiler" >&6
     6086
     6087# Is the header present?
     6088echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6089echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6090cat >conftest.$ac_ext <<_ACEOF
     6091/* confdefs.h.  */
     6092_ACEOF
     6093cat confdefs.h >>conftest.$ac_ext
     6094cat >>conftest.$ac_ext <<_ACEOF
     6095/* end confdefs.h.  */
     6096#include <$ac_header>
     6097_ACEOF
     6098if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6099  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6100  ac_status=$?
     6101  grep -v '^ *+' conftest.er1 >conftest.err
     6102  rm -f conftest.er1
     6103  cat conftest.err >&5
     6104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6105  (exit $ac_status); } >/dev/null; then
     6106  if test -s conftest.err; then
     6107    ac_cpp_err=$ac_c_preproc_warn_flag
     6108    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6109  else
     6110    ac_cpp_err=
     6111  fi
     6112else
     6113  ac_cpp_err=yes
     6114fi
     6115if test -z "$ac_cpp_err"; then
     6116  ac_header_preproc=yes
     6117else
     6118  echo "$as_me: failed program was:" >&5
     6119sed 's/^/| /' conftest.$ac_ext >&5
     6120
     6121  ac_header_preproc=no
     6122fi
     6123rm -f conftest.err conftest.$ac_ext
     6124echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6125echo "${ECHO_T}$ac_header_preproc" >&6
     6126
     6127# So?  What about this header?
     6128case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6129  yes:no: )
     6130    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6131echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6132    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6133echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6134    ac_header_preproc=yes
     6135    ;;
     6136  no:yes:* )
     6137    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6138echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6139    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6140echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6141    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6142echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6143    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6144echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6145    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6146echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6147    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6148echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6149    (
     6150      cat <<\_ASBOX
     6151## ------------------------------------------- ##
     6152## Report this to orxonox-dev@mail.datacore.ch ##
     6153## ------------------------------------------- ##
     6154_ASBOX
     6155    ) |
     6156      sed "s/^/$as_me: WARNING:     /" >&2
     6157    ;;
     6158esac
     6159echo "$as_me:$LINENO: checking for $ac_header" >&5
     6160echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6161if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6162  echo $ECHO_N "(cached) $ECHO_C" >&6
     6163else
     6164  eval "$as_ac_Header=\$ac_header_preproc"
     6165fi
     6166echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6167echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6168
     6169fi
     6170if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6171  cat >>confdefs.h <<_ACEOF
     6172#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6173_ACEOF
     6174
     6175else
     6176  { { echo "$as_me:$LINENO: error: cannot find jpeg headers" >&5
     6177echo "$as_me: error: cannot find jpeg headers" >&2;}
     6178   { (exit 1); exit 1; }; }
     6179fi
     6180
     6181done
     6182
     6183
     6184echo "$as_me:$LINENO: checking for main in -lpng" >&5
     6185echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6
     6186if test "${ac_cv_lib_png_main+set}" = set; then
     6187  echo $ECHO_N "(cached) $ECHO_C" >&6
     6188else
     6189  ac_check_lib_save_LIBS=$LIBS
     6190LIBS="-lpng  $LIBS"
     6191cat >conftest.$ac_ext <<_ACEOF
     6192/* confdefs.h.  */
     6193_ACEOF
     6194cat confdefs.h >>conftest.$ac_ext
     6195cat >>conftest.$ac_ext <<_ACEOF
     6196/* end confdefs.h.  */
     6197
     6198
     6199int
     6200main ()
     6201{
     6202main ();
     6203  ;
     6204  return 0;
     6205}
     6206_ACEOF
     6207rm -f conftest.$ac_objext conftest$ac_exeext
     6208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6209  (eval $ac_link) 2>conftest.er1
     6210  ac_status=$?
     6211  grep -v '^ *+' conftest.er1 >conftest.err
     6212  rm -f conftest.er1
     6213  cat conftest.err >&5
     6214  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6215  (exit $ac_status); } &&
     6216         { ac_try='test -z "$ac_c_werror_flag"
     6217                         || test ! -s conftest.err'
     6218  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6219  (eval $ac_try) 2>&5
     6220  ac_status=$?
     6221  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6222  (exit $ac_status); }; } &&
     6223         { ac_try='test -s conftest$ac_exeext'
     6224  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6225  (eval $ac_try) 2>&5
     6226  ac_status=$?
     6227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6228  (exit $ac_status); }; }; then
     6229  ac_cv_lib_png_main=yes
     6230else
     6231  echo "$as_me: failed program was:" >&5
     6232sed 's/^/| /' conftest.$ac_ext >&5
     6233
     6234ac_cv_lib_png_main=no
     6235fi
     6236rm -f conftest.err conftest.$ac_objext \
     6237      conftest$ac_exeext conftest.$ac_ext
     6238LIBS=$ac_check_lib_save_LIBS
     6239fi
     6240echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5
     6241echo "${ECHO_T}$ac_cv_lib_png_main" >&6
     6242if test $ac_cv_lib_png_main = yes; then
     6243  FOUND_png=yes
     6244fi
     6245
     6246    if test "$FOUND_png" = "yes" ; then
     6247      LIBS="$LIBS -lpng"
     6248    else
     6249         echo "------------------"
     6250         echo "png library not found."
     6251         echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
    60236252         echo "------------------"
    60246253         exit -1
Note: See TracChangeset for help on using the changeset viewer.