configure.in
changeset 770 883940fe64f9
parent 753 ad9d219dcb59
child 774 916c2e81e77f
equal deleted inserted replaced
768:186a7d1a80c9 770:883940fe64f9
    66 AC_ARG_ENABLE(debug,
    66 AC_ARG_ENABLE(debug,
    67 [  --enable-debug             enable debug mode [default=no]],
    67 [  --enable-debug             enable debug mode [default=no]],
    68                 , enable_debug=no)
    68                 , enable_debug=no)
    69 if test x$enable_debug = xyes; then
    69 if test x$enable_debug = xyes; then
    70   if test x$ac_cv_prog_cc_g = xyes; then
    70   if test x$ac_cv_prog_cc_g = xyes; then
    71     PHYSFSCFLAGS="-g -O0"
    71     PHYSFSCFLAGS="$PHYSFSCFLAGS -g -O0"
    72   else
    72   else
    73     PHYSFSCFLAGS="-O0"
    73     PHYSFSCFLAGS="$PHYSFSCFLAGS -O0"
    74   fi
    74   fi
    75   PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall"
    75   PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall"
    76   AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
    76   AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
    77   AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
    77   AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
    78 else
    78 else
    79   PHYSFSCFLAGS="-O2"
    79   PHYSFSCFLAGS="$PHYSFSCFLAGS -O2"
    80   AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
    80   AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
       
    81 fi
       
    82 
       
    83 
       
    84 dnl ---------------------------------------------------------------------
       
    85 dnl Have GCC's -fvisibility option?
       
    86 dnl ---------------------------------------------------------------------
       
    87 AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
       
    88 have_gcc_fvisibility=no
       
    89 visibility_CFLAGS="-fvisibility=hidden"
       
    90 save_CFLAGS="$CFLAGS"
       
    91 CFLAGS="$save_CFLAGS $visibility_CFLAGS"
       
    92 AC_TRY_COMPILE([
       
    93 int placeholder = 1;
       
    94 ],[
       
    95 ],[
       
    96 have_gcc_fvisibility=yes
       
    97 ])
       
    98 AC_MSG_RESULT($have_gcc_fvisibility)
       
    99 CFLAGS="$save_CFLAGS"
       
   100 
       
   101 if test x$have_gcc_fvisibility = xyes; then
       
   102     PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS"
    81 fi
   103 fi
    82 
   104 
    83 
   105 
    84 dnl ---------------------------------------------------------------------
   106 dnl ---------------------------------------------------------------------
    85 dnl Profile sorts, etc?
   107 dnl Profile sorts, etc?