Changeset 185
- Timestamp:
- Apr 3, 2006, 6:36:54 PM (16 years ago)
- Location:
- branches/compat-10.2
- Files:
-
- 1 added
- 4 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/compat-10.2/Makefile
r184 r185 9 9 CFLAGS += -Ilibtransmission 10 10 11 all: transmissioncli 11 all: transmissioncli transmission-gtk 12 13 lib: 14 $(MAKE) -C libtransmission 12 15 13 16 transmissioncli: lib $(OBJS) 14 17 $(CC) -o $@ $(OBJS) libtransmission/libtransmission.a $(LDFLAGS) 15 18 16 lib:17 $(MAKE) -C libtransmission19 transmission-gtk: 20 $(MAKE) -C gtk 18 21 19 22 %.o: %.c Makefile.config Makefile.common Makefile … … 23 26 $(RM) transmissioncli $(OBJS) 24 27 $(MAKE) -C libtransmission clean 28 $(MAKE) -C gtk clean 25 29 26 30 .depend: $(SRCS) Makefile -
branches/compat-10.2/Makefile.common
r134 r185 23 23 endif 24 24 25 ifeq ($(MATH),yes)26 LDFLAGS += -lm27 endif28 29 25 ifeq ($(PTHREAD),yes) 30 26 ifeq ($(SYSTEM),FreeBSD) -
branches/compat-10.2/configure.make
r134 r185 9 9 PTHREAD=no 10 10 OPENSSL= 11 GTK= 12 PREFIX=/usr/local 11 13 CC="${CC-cc}" 12 14 CFLAGS="${CFLAGS}" … … 23 25 Options: 24 26 --disable-openssl Disable OpenSSL, use built-in SHA1 implementation 27 --disable-gtk Don't build the GTK+ GUI 28 --prefix=PATH Installation path 25 29 26 30 Some influential environment variables: … … 53 57 } 54 58 59 lm_test() 60 { 61 cat > testconf.c << EOF 62 int main() 63 { 64 return cos( 42 ); 65 } 66 EOF 67 if ! $CC -o testconf testconf.c > /dev/null 2>&1 68 then 69 if $CC -o testconf testconf.c -lm > /dev/null 2>&1 70 then 71 LDFLAGS="$LDFLAGS -lm" 72 fi 73 fi 74 rm -f testconf.c testconf 75 } 76 77 lrintf_test() 78 { 79 cat > testconf.c << EOF 80 int main() 81 { 82 return ( lrintf( 3.14 ) != 3 ); 83 } 84 EOF 85 if ( $CC -o testconf testconf.c $LINKLIBS && ./testconf ) > /dev/null 2>&1 86 then 87 CFLAGS="$CFLAGS -DHAVE_LRINTF" 88 fi 89 rm -f testconf.c testconf 90 } 91 92 gettext_test() 93 { 94 cat > testconf.c <<EOF 95 #include <libintl.h> 96 int main() 97 { 98 gettext(""); 99 } 100 EOF 101 102 if $CC $CFLAGS_GTK $LDFLAGS_GTK -o testconf testconf.c > /dev/null 2>&1 103 then 104 rm -f testconf.c testconf 105 return 0 106 fi 107 108 for intl_testdir in $PREFIX/include \ 109 /usr/local/include /usr/X11R6/include /usr/pkg/include 110 do 111 if $CC $CFLAGS_GTK -I$intl_testdir $LDFLAGS_GTK -o testconf testconf.c > /dev/null 2>&1 112 then 113 CFLAGS_GTK="CFLAGS_GTK -I$intl_testdir" 114 rm -f testconf.c testconf 115 return 0 116 fi 117 done 118 rm -f testconf.c testconf 119 return 1 120 } 121 122 gtk_test() 123 { 124 if pkg-config gtk+-2.0 > /dev/null 2>&1 125 then 126 if expr `pkg-config --modversion gtk+-2.0` '>=' 2.6.0 > /dev/null 2>&1 127 then 128 cat > testconf.c << EOF 129 #include <gtk/gtk.h> 130 int main() 131 { 132 gtk_main(); 133 } 134 EOF 135 if $CC `pkg-config gtk+-2.0 --cflags --libs` -o testconf testconf.c > /dev/null 2>&1 136 then 137 CFLAGS_GTK=`pkg-config gtk+-2.0 --cflags` 138 LDFLAGS_GTK=`pkg-config gtk+-2.0 --libs` 139 if gettext_test 140 then 141 echo "yes" 142 GTK=yes 143 GTKLOCALEDIR="$PREFIX/share/locale" 144 else 145 echo "no (could not find gettext libintl.h)" 146 GTK=no 147 fi 148 else 149 echo "no" 150 GTK=no 151 fi 152 rm -f testconf.c testconf 153 else 154 echo "no (2.6.0 or later is required)" 155 GTK=no 156 fi 157 else 158 echo "no" 159 GTK=no 160 fi 161 } 55 162 56 163 # … … 63 170 x--disable-openssl) 64 171 OPENSSL=no 172 ;; 173 x--disable-gtk) 174 GTK=no 65 175 ;; 66 176 x--help) … … 109 219 110 220 FreeBSD|NetBSD|OpenBSD|Linux) 111 MATH=yes112 221 PTHREAD=yes 113 222 ;; … … 130 239 131 240 # 241 # GTK+ settings 242 # 243 echo -n "GTK+: " 244 if [ "$GTK" = no ]; then 245 echo "disabled" 246 else 247 gtk_test 248 fi 249 if [ "$GTK" = yes ]; then 250 rm -f gtk/defines.h 251 cat > gtk/defines.h << EOF 252 #ifndef TG_DEFINES_H 253 #define TG_DEFINES_H 254 #define LOCALEDIR "$GTKLOCALEDIR" 255 #endif 256 EOF 257 fi 258 259 # 260 # Math functions 261 # 262 lm_test 263 lrintf_test 264 265 # 132 266 # Generate Makefile.config 133 267 # … … 136 270 SYSTEM = $SYSTEM 137 271 BEOS_NETSERVER = $BEOS_NETSERVER 138 MATH = $MATH139 272 PTHREAD = $PTHREAD 140 273 OPENSSL = $OPENSSL 274 GTK = $GTK 141 275 CC = $CC 142 276 CFLAGS = $CFLAGS 143 277 LDFLAGS = $LDFLAGS 278 CFLAGS_GTK = $CFLAGS_GTK 279 LDFLAGS_GTK = $LDFLAGS_GTK 144 280 EOF 145 281
Note: See TracChangeset
for help on using the changeset viewer.