File: README.OSX

package info (click to toggle)
geoip 1.4.8+dfsg-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,272 kB
  • sloc: ansic: 19,471; sh: 10,137; cpp: 526; perl: 177; makefile: 133; awk: 13
file content (35 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# Building OSX fat binaries is easy.
#
# - start in a clean directory.
# - copy the shell script below to a file and edit the file to your needs.
#
# 1.) modify export GEOIP_ARCH='-arch i386 -arch x86_64 -arch ppc -arch ppc64'
# to include all architectures you need.
# 2.) add whatever you want to the ./configure line.
# 3.) execute the script.
# 4.) do a 'make install'
#
#
# make clean or make distclean before building this
#
# tell systems before leopard that we like to build for 10.5 or higher
# with MACOSX_DEPLOYMENT_TARGET=10.5
# starting with leopard we have to add -mmacosx-version-min=10.5
# to the CFLAGS and export MACOSX_DEPLOYMENT_TARGET!?

##  for tiger, leopard and snow leopard you might use this
## export GEOIP_ARCH='-arch i386 -arch x86_64 -arch ppc -arch ppc64'
## export MACOSX_DEPLOYMENT_TARGET=10.4
## export LDFLAGS=$GEOIP_ARCH
## export CFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk $GEOIP_ARCH"

# here we go for leopard and snow leopard
export GEOIP_ARCH='-arch i386 -arch x86_64 -arch ppc'
export MACOSX_DEPLOYMENT_TARGET=10.5
export LDFLAGS=$GEOIP_ARCH
export CFLAGS="-g -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk $GEOIP_ARCH"
./configure --disable-dependency-tracking
perl -i.bak -pe'/^archive_cmds=/ and !/\bGEOIP_ARCH\b/ and s/-dynamiclib\b/-dynamiclib \\\$(GEOIP_ARCH)/' ./libtool
make