n年前就弄好了, 不過還是做個備份紀錄一下.

avahi_config.sh:

#! /bin/sh

PWD=`pwd`

BUILD_DIR="build-avahi"
SRC_DIR="avahi-0.6.31-patch"
TARGET_DIR="install-avahi"

EXPAT_LIB="$BUILD_DIR/lib/libexpat"
EXPAT_INCLUDE="$BUILD_DIR/include/libexpat"

DAEMON_PKGCONFIG="$BUILD_DIR/pkgconfig/libdaemon"

cd ../

if [ -e $TARGET_DIR ]
then
    rm -rf $TARGET_DIR
fi

mkdir $TARGET_DIR

################################
# change to src directory
################################
cd $SRC_DIR

################################
# do configure
################################
./configure clean
./configure --prefix=$PWD/../$TARGET_DIR --host=mips-linux-gnu \
--localstatedir=/var \
--disable-static \
--disable-mono \
--disable-monodoc \
--disable-python \
--disable-qt3 \
--disable-qt4 \
--enable-core-docs \
--with-distro=none \
--disable-gtk \
--disable-gtk3 \
--disable-dbus \
--disable-glib \
--disable-gobject \
--disable-gdbm \
--with-xml=expat \
--with-avahi-user=root \
--with-avahi-group=root \
--with-avahi-priv-access-group=root \
--enable-autoipd \
--with-autoipd-user=root \
--with-autoipd-group=root \
--disable-tests \
PKG_CONFIG_PATH=$PWD/../$DAEMON_PKGCONFIG/lib/pkgconfig \
CC="mips-linux-gnu-gcc -EL -I$PWD/../$EXPAT_INCLUDE -L$PWD/../$EXPAT_LIB" CFLAGS="-mips32 -EL -msoft-float" LDFLAGS="-EL -msoft-float" 

 

間單來說,

編譯 avahi source code 需要用到兩個外部 libraray,

libdaemon 和 libexpat,

libdaemon 以 pc 方式和 avahi 連結,

libexpat 以 library 和 header files 和 avahi 連結.

 

arrow
arrow
    全站熱搜

    kk 發表在 痞客邦 留言(0) 人氣()