configure.in
branchstable-1.0
changeset 769 c9ff41dec8fa
parent 750 1a9776396bb6
child 966 816a83f04a27
equal deleted inserted replaced
766:3970811e14f4 769:c9ff41dec8fa
    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 dnl ---------------------------------------------------------------------
       
    84 dnl Have GCC's -fvisibility option?
       
    85 dnl ---------------------------------------------------------------------
       
    86 AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
       
    87 have_gcc_fvisibility=no
       
    88 visibility_CFLAGS="-fvisibility=hidden"
       
    89 save_CFLAGS="$CFLAGS"
       
    90 CFLAGS="$save_CFLAGS $visibility_CFLAGS"
       
    91 AC_TRY_COMPILE([
       
    92 int placeholder = 1;
       
    93 ],[
       
    94 ],[
       
    95 have_gcc_fvisibility=yes
       
    96 ])
       
    97 AC_MSG_RESULT($have_gcc_fvisibility)
       
    98 CFLAGS="$save_CFLAGS"
       
    99 
       
   100 if test x$have_gcc_fvisibility = xyes; then
       
   101     PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS"
    81 fi
   102 fi
    82 
   103 
    83 
   104 
    84 dnl ---------------------------------------------------------------------
   105 dnl ---------------------------------------------------------------------
    85 dnl Profile sorts, etc?
   106 dnl Profile sorts, etc?