FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} --enable-shared=no --prefix=${PRODUCT_DIR}"
if test `uname -m` = "x86_64" ; then
-FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} CFLAGS=' -fPIC m64'"
+FREETYPE_CONFIGURE_OPTIONS="${FREETYPE_CONFIGURE_OPTIONS} CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'"
fi
#congigure
FTGL_CONFIGURE_OPTIONS=""
FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --enable-shared=yes --prefix=${PRODUCT_DIR}"
FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-freetype-prefix=${FREETYPEDIR}"
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-gl-inc=/usr/include --with-glut-inc=/usr/include "
+
+if test `uname -m` = "x86_64" ; then
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-gl-lib=/usr/lib64 --with-glut-lib=/usr/lib64"
+else
+FTGL_CONFIGURE_OPTIONS="${FTGL_CONFIGURE_OPTIONS} --with-gl-lib=/usr/lib --with-glut-lib=/usr/lib64"
+fi
#congigure
check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure ${FTGL_CONFIGURE_OPTIONS}