Revision daf8e955 configure

View differences:

configure
21 21
gprof="no"
22 22
mp3lib="yes"
23 23
grab="yes"
24
win32="no"
24 25

  
25 26
if [ "$1" = "-h" -o "$1" = "--help" ] ; then
26 27
cat << EOF
......
37 38
echo "  --enable-gprof          enable profiling with gprof [$gprof]"
38 39
echo "  --disable-mp3lib        disable mp3 lib compiling"
39 40
echo "  --disable-grab          disable audio/video grabbing code"
41
echo "  --enable-win32          enable win32 cross compile"
40 42
exit 1
41 43
fi
42 44

  
......
56 58
  ;;
57 59
  --disable-grab) grab="no"
58 60
  ;;
61
  --enable-win32) win32="yes"
62
  ;;
59 63
  esac
60 64
done
61 65

  
66
# Checking for CFLAGS
67
if test -z "$CFLAGS"; then
68
    CFLAGS="-O2"
69
fi
70

  
71
if [ "$win32" = "yes" ] ; then
72
    cross_prefix="i386-mingw32msvc-"
73
    cc="${cross_prefix}gcc"
74
    ar="${cross_prefix}ar"
75
    grab="no"
76
fi
77

  
62 78
echo "Install prefix   $prefix"
63 79
echo "C compiler       $cc"
64 80
echo "CPU              $cpu"
......
71 87
echo "# Automatically generated by configure - do not modify" > config.mak
72 88
echo "/* Automatically generated by configure - do not modify */" > config.h
73 89

  
74
# Checking for CFLAGS
75
if test -z "$CFLAGS"; then
76
 CFLAGS="-O2"
77
fi
78

  
79 90
echo "prefix=$prefix" >> config.mak
80 91
echo "MAKE=make" >> config.mak
81 92
echo "CC=$cc" >> config.mak
......
120 131
  echo "#define CONFIG_GRAB 1" >> config.h
121 132
  echo "CONFIG_GRAB=yes" >> config.mak
122 133
fi
134

  
135
if [ "$win32" = "yes" ] ; then
136
  echo "#define CONFIG_WIN32 1" >> config.h
137
  echo "CONFIG_WIN32=yes" >> config.mak
138
fi

Also available in: Unified diff