📄 configure.ac
字号:
YARDCONF="/etc/yardradius" YARDLOG="/var/log/yardradius" YARDDOC="/usr/share/doc/yardradius"else if test "$prefix" != "NONE"; then YARDCONF=$prefix/conf YARDLOG=$prefix/logs YARDDOC=$prefix/doc else YARDCONF=/usr/local/yardradius/conf YARDLOG=/usr/local/yardradius/logs YARDDOC=/usr/local/yardradius/doc fifiAC_SUBST(YARDCONF)AC_SUBST(YARDLOG)AC_SUBST(YARDDOC)dnldnl Add include dirs, mainly for GDBM library, but also for otherdnl non standard headersdnl AC_ARG_WITH(includes, [ --with-includes=DIR site header files for GDBM, etc in DIR], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([*** You must supply an argument to the --with-includes option.]) ;; esac INCLUDE_DIRS="$withval" ])if test "$INCLUDE_DIRS"; then for dir in $INCLUDE_DIRS; do if test -d "$dir"; then YARD_CPPFLAGS="$YARD_CPPFLAGS -I$dir" else AC_MSG_WARN([*** Include directory $dir does not exist.]) fi doneelse EXTRADIRS="/usr/local/include /opt/include /opt/gnu/include" for dir in $EXTRADIRS; do if test -d "$dir"; then YARD_CPPFLAGS="$YARD_CPPFLAGS -I$dir" fi donefiAC_ARG_WITH(libs, [ --with-libdir=DIR also search for libraries in DIR], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([*** You must supply an argument to the --with-libdir option.]) ;; esac LIBRARY_DIRS="$withval" ])AC_ARG_WITH(libraries, [ --with-libraries='-lxxx -lyyy' also link libraries libxxx.a and libyyy.a], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([*** You must supply an argument to the --with-libraries option.]) ;; esac MORELIBRARIES="$withval" ])dnldnl Test for linker shared libraries search options.dnl These are non standard option. Configurator knows three well-knowndnl options, i.e.dnl dnl -R (Solaris)dnl -rpath (SunOS, FreeBSD, Compaq Tru64)dnl -Xlinker -rpath (GCC)dnl -Wl,-rpath (GCC)dnldnl If all these options fail you should use some other exoticdnl feature, such as an environment variable (eg LD_LIBRARY_PATH ordnl LD_RUN_PATH) or a configuraton file (eg /etc/ld.so.conf with dnl 'ldconfig' a la Linux). At this moment all this is up to you. dnl dnl This is skipped for Debian GNU/Linux as required by Policy Manual.dnlif test "$DEBIAN" = "no"; thenTEMPLDFLAGS="$LDFLAGS" LDFLAGS="-R /usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -R flag supported]) LINKSHRDFLAGS="-R" ],[ AC_MSG_RESULT([Linker -R flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"if test ! "$LINKSHRDFLAGS"; thenLDFLAGS="-rpath /usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -rpath flag supported]) LINKSHRDFLAGS="-rpath " ],[ AC_MSG_RESULT([Linker -rpath flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"fiif test ! "$LINKSHRDFLAGS"; thenLDFLAGS="-Xlinker -rpath -Xlinker /usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -Xlinker -rpath flag supported]) LINKSHRDFLAGS="-Xlinker -rpath -Xlinker " ],[ AC_MSG_RESULT([Linker -Xlinker -rpath flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"fiif test ! "$LINKSHRDFLAGS"; thenLDFLAGS="-Xlinker -R -Xlinker /usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -Xlinker -R flag supported]) LINKSHRDFLAGS="-Xlinker -R -Xlinker " ],[ AC_MSG_RESULT([Linker -Xlinker -R flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"fiif test ! "$LINKSHRDFLAGS"; thenLDFLAGS="-Wl,-R -Wl,/usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -Wl,-R flag supported]) LINKSHRDFLAGS="-Wl,-R -Wl," ],[ AC_MSG_RESULT([Linker -Wl,-R flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"fiif test ! "$LINKSHRDFLAGS"; thenLDFLAGS="-Wl,-rpath -Wl,/usr/lib"AC_RUN_IFELSE([AC_LANG_SOURCE([[ main() { exit(0); } ]])],[ AC_MSG_RESULT([Linker -Wl,-rpath flag supported]) LINKSHRDFLAGS="-Wl,-rpath -Wl," ],[ AC_MSG_RESULT([Linker -Wl,-rpath flag not supported]) ],[ AC_MSG_RESULT([Cross compiling not supported]) ])LDFLAGS="$TEMPLDFLAGS"fiif test ! "$LINKSHRDFLAGS"; then $ECHO "%BNo local support of additional shlib linking found%b"fifidnldnl Add additional library path to checkdnlif test "$LIBRARY_DIRS"; then for dir in $LIBRARY_DIRS; do if test -d "$dir"; then if test "$LINKSHRDFLAGS"; then YARD_LDFLAGS="$YARD_LDFLAGS $LINKSHRDFLAGS$dir -L$dir " else YARD_LDFLAGS="$YARD_LDFLAGS -L$dir " fi else AC_MSG_WARN([*** Library directory $dir does not exist.]) fi doneelse EXTRADIRS="/usr/local/lib /opt/lib /opt/gnu/lib " for dir in $EXTRADIRS; do if test -d "$dir"; then if test "$LINKSHRDFLAGS"; then YARD_LDFLAGS="$YARD_LDFLAGS $LINKSHRDFLAGS$dir -L$dir " else YARD_LDFLAGS="$YARD_LDFLAGS -L$dir " fi fi donefiCPPFLAGS="$CPPFLAGS $YARD_CPPFLAGS"$ECHO "Setting %BCPPFLAGS%b = $CPPFLAGS"AC_SUBST(CPPFLAGS)LDFLAGS="$LDFLAGS $YARD_LDFLAGS"$ECHO "Setting %BLDFLAGS%b = $LDFLAGS"AC_SUBST(LDFLAGS)LIBS="$YARD_SID_LIBS$YARD_ACARD_LIBS $LIBS$YARD_IPASS_LIBS $MORELIBRARIES"$ECHO "Setting %BLIBS%b = $LIBS"dnldnl Now it's time to search the GDBM library. Sometimes its name is dnl not the standard one. That's true in very old system such as somednl old RH systems AFAIK.dnlAC_SEARCH_LIBS(gdbm_open,gdbm dbm db ndbm)if test "$ac_cv_search_gdbm_open" = "no"; then AC_MSG_ERROR([ GDBM library not found. Please install it or give the library name at configuration time with a --with-libraries="-lname" argument ])fiAC_CONFIG_FILES([Makefileconf/menus/Makefileconf/Makefiledoc/rfc/Makefiledoc/txt/Makefiledoc/Makefileinclude/Makefilepam/Makefilesrc/Makefilelogs/Makefileman/Makefile])AC_CONFIG_COMMANDS([misc],[[if test "$DEBIAN" = "yes"; thencat > default-paths.h <<EOF/*** This file is produced by the configure script automagically.** Do not edit it manually, please*/#define RADIUS_DIR "$YARDCONF"#define RADACCT_DIR "$YARDLOG"EOFelsecat > default-paths.h <<EOF/*** This file is produced by the configure script automagically.** Do not edit it manually, please*/#define RADIUS_DIR "$prefix/conf"#define RADACCT_DIR "$prefix/logs"EOFficat > hostinfo.h <<EOF/*** This file is produced by the configure script automagically.** Do not edit it manually, please.*/#define HOSTINFO "$host"EOF$srcdir/scripts/changeprefix man "$prefix"]],[[prefix=$prefix host=$host]])dnldnl This macro must be the very last one.dnlAC_OUTPUT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -