
---------------- apr ---------------------

HUOM!!!: Älä tuhoa käännöskansiota pois kääntämisen jälkeen, apr-iconv ja apr-util tarvitsee sitä
fat 32 bit build toimii!!!:

build apr:

CFLAGS="-mmacosx-version-min=10.6 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-mmacosx-version-min=10.6  -arch i386" ./configure --enable-static --prefix=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr/library

cd ~/svnroot/cpp/ApachePortableRuntime/apr
rm -R apr-1.4.6
rm -R apr-1.4.8
rm -R library
tar xjvf apr-1.4.8.tar.bz2
cd apr-1.4.8

pasi x64:
cd /Users/pasi/ma-git/other/c/MA_Plugin_x64/apr-x64/apr-1.7.0
CFLAGS="-mmacosx-version-min=10.6"  CXXFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure --enable-static --prefix=/Users/pasi/ma-git/other/c/MA_Plugin_x64/apr-x64

pasi:
CFLAGS="-mmacosx-version-min=10.6 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-mmacosx-version-min=10.6  -arch i386" ./configure --enable-static --prefix=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr/library 

manage (läppäri):
CFLAGS="-mmacosx-version-min=10.6 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-mmacosx-version-min=10.6  -arch i386" ./configure --enable-static --prefix=/Users/manage/svnroot/cpp/ApachePortableRuntime/apr/library 

imac1:
CFLAGS="-mmacosx-version-min=10.6 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-mmacosx-version-min=10.6  -arch i386" ./configure --enable-static --prefix=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr/library 
(--disable-shared )

make clean
make
make install
make test

-------------

svn co http://svn.apache.org/repos/asf/apr/apr/trunk/ apr
./buildconf


./configure --help

 --with-iconv=/usr/lib
(
CFLAGS="-mmacosx-version-min=10.5 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.5 -arch i386" LDFLAGS="-mmacosx-version-min=10.5  -arch i386" ./configure --enable-static --disable-shared --prefix=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr/library_1.3.12
)




CFLAGS="-mmacosx-version-min=10.5 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.5 -arch i386" LDFLAGS="-mmacosx-version-min=10.5  -arch i386" ./configure --enable-static --disable-shared --prefix=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr/library  --with-iconv=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr-iconv/library/lib/iconv


ei toimi:
 --with-iconv=/usr/lib
 

------------
cd /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-util/apr-util-1.3.12
cd /Users/manage/svnroot/cpp/ApachePortableRuntime/apr-util/apr-util-1.3.12


CFLAGS="-mmacosx-version-min=10.6 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-mmacosx-version-min=10.6  -arch i386" ./configure --with-apr=/Users/manage/svnroot/cpp/ApachePortableRuntime/apr/library --prefix=/Users/manage/svnroot/cpp/ApachePortableRuntime/apr-util/library
 
make clean

------------

make
make install
make test (ei pakollinen, kestää kauan)

((
-O -m32 
 LDFLAGS="-arch i386" 
 
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/apr/library/fat
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr/library --exec-prefix=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr/library/fat
))
---------------- apr-iconv ---------------

build apr-iconv:


cd ~/svnroot/cpp/ApachePortableRuntime/apr-iconv
rm -R apr-iconv-1.2.1
tar xvfz apr-iconv-1.2.1.tar.bz2
cd ~/svnroot/cpp/ApachePortableRuntime/apr-iconv/apr-iconv-1.2.1

CFLAGS="-mmacosx-version-min=10.5 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.5 -arch i386" LDFLAGS="-mmacosx-version-min=10.5  -arch i386" ./configure --prefix=/Users/gb-i5/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-apr=/Users/gb-i5/svnroot/cpp/ApachePortableRuntime/apr/library

CFLAGS="-mmacosx-version-min=10.5 -arch i386"  CXXFLAGS="-mmacosx-version-min=10.5 -arch i386" LDFLAGS="-mmacosx-version-min=10.5  -arch i386" ./configure --prefix=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-apr=/Users/pasi/svnroot/cpp/ApachePortableRuntime/apr/library


cd /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-iconv
rm -R apr-iconv-1.2.1
tar xvfz apr-iconv-1.2.1.tar.gz
cd /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-iconv/apr-iconv-1.2.1
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-apr=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12

TAI 

make
make install


Libraries have been installed in:
   /Users/pasi/svnroot/cpp/ApachePortableRuntime/apr-iconv/library/lib/iconv



CFLAGS="-arch i386 -arch x86_64" CXXFLAGS="-arch i386 -arch x86_64" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/

((
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/


((CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/apr-iconv/library/fat --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/
))


---------------- freetds -----------------

http://www.freetds.org/
http://rasterweb.net/raster/code/freetdsnotes.html
Installing FreeTDS on Mac OS X

./configure --help


Libraries have been installed in:
   /usr/local/apache2/lib/iconv


open ~/svnroot/cpp/ApachePortableRuntime/database-drivers

cd ~/svnroot/cpp/ApachePortableRuntime/database-drivers
sudo rm -R freetds_library/i386
sudo rm -R freetds_library/library
tar xvfz freetds-stable.tgz 


cd ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds-0.82
make clean

CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386  --with-libiconv-prefix=/usr/local/apache2/lib/iconv --with-tdsver=8.0 --enable-msdblib

TAI (vanha toimii)

CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386  --with-libiconv-prefix=~/svnroot/cpp/ApachePortableRuntime/apr-iconv/library --with-tdsver=8.0 --enable-msdblib

XXXXXX
edit libtool
Replace: \$deplibs tyhjäksi (4 kpl)

XXXXXX

make
make check

make install

cp -R ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/lib/ ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/

cp -R ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/bin/ ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/bin/

sudo rm -R ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds-0.82

cd ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/bin
./tsql -C


Run script:

if [ -d ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.bundle/Contents/Windows ];
then
	echo "Dir exists."
else
	mkdir ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.bundle/Contents/Windows
fi

cp ~/svnroot/cpp/MA_Plugin_x64/Test/Plugins/MA_Plugin_x64.bundle/Contents/Resources/MA_Plugin_x64.rsrc ~/svnroot/cpp/MA_Plugin_x64/Test/Win4DX/MA_Plugin_x64.rsr

cp ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.bundle/Contents/Resources/MA_Plugin_x64.rsrc ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.bundle/Contents/Windows/MA_Plugin_x64.rsr

cp ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.4dx ~/svnroot/cpp/MA_Plugin_x64/release/MA_Plugin_x64.bundle/Contents/Windows/MA_Plugin_x64.4dx


--------------------

./tsql -S 192.168.2.9 -p 1433 -U sa -P mysqlMaa -D test
quit


---
edit libtool
Replace: \$deplibs tyhjäksi (4 kpl)

--
After you untar the thing, run configure with the following options:

You then need to edit the libtool file. Somewhere around line 205 you should see:

archive_cmds="\$CC \$(if test .\$module = .yes; then echo -bundle; else echo -dynamiclib; fi) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts -install_name \$rpath/\$soname \$verstring"

find: \$deplibs
Remove this bit from the line: \$deplibs


fat build EI toimi, käytetään lipoa myöhemmin:

i386 build:

((
--enable-msdblib 
 --with-odbc
 --disable-libiconv  
 --with-openssl=/usr
edit libtool
Remove this bit from the line: \$deplibs

))

 --with-openssl=/usr
 
edit libtool
Remove this bit from the line: \$deplibs - VAIN 1. kerta 

testaa: 
cd ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/bin
./tsql -S 192.168.2.9 -p 1433 -U sa -P mysqlMaa sa -D test

tai
cd ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/bin


telnet 192.168.2.9 1433

((((
   --enable-msdblib
 --with-gnutls

 --with-openssl

 --enable-msdblib --with-gnutls --with-openssl
--
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --disable-libiconv --disable-odbc --prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386

edit libtool
Remove this bit from the line: \$deplibs
make
make install

ppc build:
CFLAGS="-arch ppc" CXXFLAGS="-arch ppc" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library --exec-prefix=~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/ppc --host=ppc   --disable-libiconv --enable-msdblib --with-tdsver=8.0 --with-openssl



lipo -create ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/lib/libct.a ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/ppc/lib/libct.a -output ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libct.a
lipo -create ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/lib/libsybdb.a ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/ppc/lib/libsybdb.a -output ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libsybdb.a
lipo -create ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/i386/lib/libtdsodbc.a ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/ppc/lib/libtdsodbc.a -output ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libtdsodbc.a

file ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libct.a
file ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libsybdb.a
file ~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library/lib/libtdsodbc.a

))))


--

Configuring FreeTDS
Once that is all done, you need to configure the file at /usr/local/etc/freetds.conf

Charsets
Ah, I was having problems with charsets and grabbing data from a Microsoft SQL Server, so added one more line to the server's config:

[SQLServer2000]
    host = sql.example.com
    port = 1433
    tds version = 8.0
    client charset = UTF-8
Which seems like it'll do the right thing now, which is convert WINDOWS-1252 to UTF-8


---------------- install oracle osx ----------------

Installing Oracle Instant Client for Intel Mac
At first you need to download Oracle Instant Client for Intel Mac. Download “Instant Client Package – Basic” and “Instant Client Package – SDK” and also I suggest “Instant Client Package – SQL*Plus” if you would like to have command line sqlplus utility.

instantclient-basic-10.2.0.4.0-macosx-x86.zip
instantclient-jdbc-10.2.0.4.0-macosx-x86.zip
instantclient-sdk-10.2.0.4.0-macosx-x86.zip
instantclient-sqlplus-10.2.0.4.0-macosx-x86.zip


tee uusi kansio lib ja siirrä seuraavat lib kansioon
libclntsh.dylib.10.1
libheteroxa10.dylib
libheteroxa10.jnilib
libnnz10.dylib
libocci.dylib.10.1
libociei.dylib
libocijdbc10.dylib
libocijdbc10.jnilib
libsqlplus.dylib
libsqlplusic.dylib

Unzip downloaded archives and move it where you would like to have it – I am keeping it in /usr/local/oracle/instantclient_10_2. 
Then go to this directory and make symbolic links for dynamic libraries

cd /usr/local/oracle/instantclient_10_2/lib
sudo ln -s libclntsh.dylib.10.1 libclntsh.dylib
sudo ln -s libocci.dylib.10.1 libocci.dylib

?:
sudo ln -s libheteroxa10.dylib libheteroxa.dylib
sudo ln -s libocijdbc10.dylib libocijdbc.dylib (jdbc?)

Then I recommend to create and place somewhere your tnsnames.ora file where you will keep your database connections definitions – I place this file in directory /usr/local/oracle/network/admin.

Then finally you need to set up necessary environment variables – I place the following definitions in my .bash_profile script:
cd ~
edit .bash_profile
 lisää:
 
export DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient_10_2/lib"
export SQLPATH="/usr/local/oracle/instantclient_10_2"
export TNS_ADMIN="/usr/local/oracle/network/admin"
export NLS_LANG="AMERICAN_AMERICA.UTF8"
export PATH=$PATH:$DYLD_LIBRARY_PATH
export PATH=$PATH:$SQLPATH

source .bash_profile // lataa uusiksi muistiin bash_profile
sqlplus // testaa toimiiko
sqlplus hr/hr@//192.168.2.9:1521/XE
sqlplus system/mysqlMaa@//192.168.2.9:1521/XE

---------------- apr-util ----------------

build apr-util:
oracle+odbc+mysql+postgre+freetds+sqlite3 i386:
./configure --help

sudo rm /usr/local/mysql 
sudo ln -s /usr/local/mysql-5.1.45-osx10.6-x86 /usr/local/mysql


open ~/svnroot/cpp/ApachePortableRuntime/apr-util
cd ~/svnroot/cpp/ApachePortableRuntime/apr-util
rm -R apr-util-1.5.1
rm -R library
tar xvfz apr-util-1.5.1.tar.bz2
cd ~/svnroot/cpp/ApachePortableRuntime/apr-util/apr-util-1.5.1
CFLAGS="-mmacosx-version-min=10.6 -arch i386" CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" LDFLAGS="-arch i386" MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config ./configure --prefix=/Users/gb-i5/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=/Users/gb-i5/svnroot/cpp/ApachePortableRuntime/apr/library/ --with-sqlite3 --with-mysql --with-odbc=/usr/lib 

--with-pgsql="/Library/PostgreSQL/8.4" 
--with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library" 
--with-oracle="/usr/local/oracle/instantclient_10_2"  --with-oracle-include="/usr/local/oracle/instantclient_10_2/sdk/include"


open /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-util
cd /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-util
sudo rm -R apr-util-1.3.9
sudo rm -R library
tar xvfz apr-util-1.3.9.tar.gz 
cd /Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-util/apr-util-1.3.9
make clean
MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" CXXFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --prefix=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=/Users/imac1/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-sqlite3 --with-freetds="/Users/imac1/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/usr/lib --with-oracle="/usr/local/oracle/instantclient_10_2"  --with-oracle-include="/usr/local/oracle/instantclient_10_2/sdk/include"



make
make test

make install

sudo rm /usr/local/mysql 
sudo ln -s /usr/local/mysql-5.1.45-osx10.6-x86_64 /usr/local/mysql



((((
---
MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/usr/lib --with-oracle="/usr/local/oracle/instantclient_10_2"  --with-oracle-include="/usr/local/oracle/instantclient_10_2/sdk/include"
---

ilman oraclea i386:
MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/usr/lib

---

i386:
ODBC_CONFIG=usr/local/iODBC/bin/iodbc-config MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc

i386:
MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/lib

((

fat EI toimi:
MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4"--with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/lib


file://localhost/Applications/prog/database/MySql/mysql-connector-c-6.0.2-osx10.5-x86-32bit/bin/mysql_config
x86 using mysql connector:

CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4"--with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql="/Applications/prog/database/MySql/mysql-connector-c-6.0.2-osx10.5-x86-32bit"  --with-odbc=/lib

MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-I/usr/local/mysql/include/ -arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4"--with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"  --with-mysql  --with-odbc=/lib



CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --with-apr=/usr/local/apr  --with-odbc --with-pgsql="/Library/PostgreSQL/8.4/lib" --with-mysql="/usr/local/mysql/lib" --with-sqlite3 --with-freetds


CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-mysql="/usr/local/mysql" --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"   --with-odbc=/lib

LDFLAGS="-L/usr/local/mysql/lib -lmysqlclient_r" MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-I/usr/local/mysql/include/ -arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-mysql --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"   --with-odbc=/lib

MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config CFLAGS="-I/usr/local/mysql/include/ -arch i386" ./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-pgsql="/Library/PostgreSQL/8.4" --with-mysql --with-sqlite3 --with-freetds="~/svnroot/cpp/ApachePortableRuntime/database-drivers/freetds_library/library"   --with-odbc=/lib


((
./configure --prefix=~/svnroot/cpp/ApachePortableRuntime/apr-util/library --with-apr=~/svnroot/cpp/ApachePortableRuntime/apr/apr-1.3.12/ --with-mysql="/usr/local/mysql"
))

))))


test db in MA_Plugin_v11:
~/svnroot/cpp/Test/sqlite3_test.db
SELECT name FROM sqlite_master WHERE type = "table";
SELECT name FROM apr_dbd_test;


 --with-dbm=db47
/Applications/prog/database/MySql/mysql-connector-c-6.0.2-osx10.5-x86-32bit/bin/mysql_config
/usr/local/mysql/bin/mysql_config
 
Libraries have been installed in:
   /usr/local/apr/lib

-------------------------------------

build zeromq - does NOT support PPC? :
cd ~/svnroot/cpp/zeromq-2.0-alpha3

make clean

CXXFLAGS="-arch i386" ./configure --with-cpp --with-java --with-forwarder --with-perf --enable-static JAVA_HOME=/Library/Java/Home

make
make check
sudo make install


 --with-pgm --with-java ???

-------------------------------------


ehkä?
CFLAGS="-arch i386" CXXFLAGS="-arch i386" ./configure --enable-shared=no

malleja:
CFLAGS="-arch i38664 -arch x86_64 -O3 -fno-omit-frame-pointer" CXXFLAGS="-arch i38664 -arch x86_64 -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure
