Revision 75388c74

View differences:

configure
424 424
fi
425 425

  
426 426
#Darwin CC versions
427
needmdynamicnopic="no"
427 428
if test $targetos = Darwin; then
428 429
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
429 430
	CFLAGS="-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
......
433 434
	    *2.95*) 
434 435
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
435 436
		;;
436
	    *3.1*)
437
	    *3.*)
437 438
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
438
		;;
439
	    *3.3*)
440
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL -Wno-sign-compare"
439
		if test "$lshared" = no; then
440
		   needmdynamicnopic="yes"
441
		fi
441 442
		;;
442 443
	    *)
443
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
444
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
445
		if test "$lshared" = no; then
446
		   needmdynamicnopic="yes"
447
		fi
444 448
		;;
445 449
	esac
446 450
    fi
......
916 920
echo "AR=$ar" >> config.mak
917 921
echo "RANLIB=$ranlib" >> config.mak
918 922
echo "STRIP=$strip" >> config.mak
923

  
924
# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic.  Used when building 
925
# shared modules on OS/X (vhook/Makefile).
926
SHCFLAGS=$CFLAGS
927
if test "$needmdynamicnopic" = yes; then
928
   CFLAGS="$CFLAGS -mdynamic-no-pic"
929
fi
930

  
919 931
echo "OPTFLAGS=$CFLAGS" >> config.mak
932
echo "SHCFLAGS=$SHCFLAGS">>config.mak
920 933
echo "LDFLAGS=$LDFLAGS" >> config.mak
921 934
echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
922 935
echo "SHFLAGS=$SHFLAGS" >> config.mak
vhook/Makefile
2 2

  
3 3
VPATH=$(SRC_PATH)/vhook
4 4

  
5
CFLAGS=-fPIC $(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
5
CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
6 6

  
7 7
ifeq ($(CONFIG_DARWIN),yes)
8
SHFLAGS+=-bundle -flat_namespace -undefined suppress
8
SHFLAGS+=-flat_namespace -undefined suppress
9 9
endif
10 10
HOOKS=null.so fish.so ppm.so
11 11

  
......
26 26
	$(CC) -MM $(CFLAGS) $^ 1>.depend
27 27

  
28 28
install:
29
	install -s -m 755 $(HOOKS) $(INSTDIR)
29
	install -m 755 $(HOOKS) $(INSTDIR)
30 30

  
31 31
imlib2.so: imlib2.o
32 32
	$(CC) -g -o $@ $(SHFLAGS) $< -lImlib2

Also available in: Unified diff