Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 131198 | Differences between
and this patch

Collapse All | Expand All

(-)configure.in.orig (-47 / +3 lines)
Lines 12-18 Link Here
12
dnl Mingw, because it doesnt have a standard file tree. Maybe if ming do this
12
dnl Mingw, because it doesnt have a standard file tree. Maybe if ming do this
13
dnl else do -I/usr/include. Or some shit. You figure it out.
13
dnl else do -I/usr/include. Or some shit. You figure it out.
14
14
15
LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"
16
dnl - Same thing here.
15
dnl - Same thing here.
17
16
18
dnl - Where are our compilers, and who are we compiling for?
17
dnl - Where are our compilers, and who are we compiling for?
Lines 190-241 Link Here
190
dnl - It is easier to debug zsnes with no optimization enabled.
189
dnl - It is easier to debug zsnes with no optimization enabled.
191
  ZSNESEXE="zsnesd"
190
  ZSNESEXE="zsnesd"
192
  PSR_TEMP=""
191
  PSR_TEMP=""
193
  CFLAGS="$CFLAGS -Wall -W -DDEBUG -O0 -fno-omit-frame-pointer -gstabs3"
192
  CFLAGS="$CFLAGS -Wall -W -DDEBUG -gstabs3"
194
  NFLAGS="$NFLAGS -DDEBUG -g -F stabs -s -O0"
193
  NFLAGS="$NFLAGS -DDEBUG -g -F stabs -s -O0"
195
else
194
else
196
  ZSNESEXE="zsnes"
195
  ZSNESEXE="zsnes"
197
  PSR_TEMP="	rm -f t_\$*.c"
196
  PSR_TEMP="	rm -f t_\$*.c"
198
197
199
  CFLAGSBAK="$CFLAGS"
200
  AC_ARG_VAR(force_arch, [Force architecture to optimize GCC/G++ for])
201
  AC_MSG_CHECKING(which cpu architecture to optimize for)
202
  if test x$force_arch != x; then
203
    CFLAGS="$CFLAGS -march=$force_arch"
204
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]])],
205
    [AC_MSG_RESULT(forcing $force_arch)],
206
    [AC_MSG_RESULT($force_arch ??)
207
    AC_MSG_WARN(incorrect force_arch parameter)
208
    force_arch=""
209
    CFLAGS="$CFLAGSBAK"
210
    AC_MSG_CHECKING(for autodetected architecture)])
211
  fi
212
  if test x$force_arch = x; then
213
    if test x$ARCH_INFO = x; then
214
      case x$target in
215
        i686-*-*)
216
          AC_MSG_RESULT(guessing i686)
217
          CFLAGS="$CFLAGS -march=i686"
218
          ;;
219
        i586-*-*)
220
          AC_MSG_RESULT(guessing i586)
221
          CFLAGS="$CFLAGS -march=i586"
222
          ;;
223
        i486-*-*)
224
          AC_MSG_RESULT(guessing i486)
225
          CFLAGS="$CFLAGS -march=i486"
226
          ;;
227
        *)
228
          AC_MSG_RESULT(guessing i386)
229
          CFLAGS="$CFLAGS -march=i386"
230
          AC_MSG_WARN([This is not what you want, use --target or force-arch])
231
          ;;
232
      esac
233
    else
234
      AC_MSG_RESULT($ARCH_INFO)
235
      CFLAGS="$CFLAGS -march=$ARCH_INFO"
236
    fi
237
  fi
238
239
  AC_ARG_ENABLE(release,
198
  AC_ARG_ENABLE(release,
240
    [  --enable-release        Build ultra-optimized release binary (zsnes)],
199
    [  --enable-release        Build ultra-optimized release binary (zsnes)],
241
    release=$enableval,
200
    release=$enableval,
Lines 243-255 Link Here
243
  AC_MSG_CHECKING(if you want crazy optimizations)
202
  AC_MSG_CHECKING(if you want crazy optimizations)
244
  AC_MSG_RESULT($release)
203
  AC_MSG_RESULT($release)
245
  if test x$release = xyes; then
204
  if test x$release = xyes; then
246
    if test x$force_arch = x; then
205
    CFLAGS="$CFLAGS $STRIP -D__RELEASE__"
247
      AC_MSG_WARN([If you intend to distribute this binary, make sure you use force_arch and set to i586 (or whichever CPU Arch you intend for)])
248
    fi
249
    CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr $STRIP -D__RELEASE__"
250
    NFLAGS="$NFLAGS -O99999999 -D__RELEASE__"
206
    NFLAGS="$NFLAGS -O99999999 -D__RELEASE__"
251
  else
207
  else
252
    CFLAGS="$CFLAGS -O3 -fomit-frame-pointer $STRIP"
208
    CFLAGS="$CFLAGS $STRIP"
253
    NFLAGS="$NFLAGS -O1"
209
    NFLAGS="$NFLAGS -O1"
254
  fi
210
  fi
255
fi
211
fi

Return to bug 131198