⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.ac

📁 一个windows上的加解密程式 提供方便的介面让使用者操作
💻 AC
字号:
# -*- shell-script -*-## Simple configure.in for gaim-encryption### Init autoconf#AC_INIT(./encrypt.c)AC_PREREQ(2.52)AC_CANONICAL_SYSTEM## Init automake# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and# VERSION macors#GAIM_ENC_VERSION="`cat $srcdir/VERSION`"AM_INIT_AUTOMAKE(gaim-encryption, $GAIM_ENC_VERSION, 'no-define')AC_DEFINE_UNQUOTED(ENC_VERSION, "$GAIM_ENC_VERSION",    [Version of gaim-encryption plugin])AC_DEFINE_UNQUOTED(ENC_PACKAGE, "$PACKAGE",    [Version of gaim-encryption plugin]) # before gettexting, in case iconv matterscase "$host_os" indarwin*)        AC_MSG_CHECKING([for fink])        if test -d /sw; then                AC_MSG_RESULT([found, adding /sw to search paths])                CFLAGS="$CFLAGS -I/sw/include"        else                AC_MSG_RESULT([not found])        fi        ;;*)        ;;esac ALL_LINGUAS="cs da de es fr hu it ja nl pl pt_BR ru sl uk zh_TW"AM_GNU_GETTEXT_VERSION(0.10.40)AM_GNU_GETTEXT## Setup the header file#AH_TOP([/* Gaim-encryption header file */#ifndef _GAIM_ENCRYPTION_CONFIG_H#define _GAIM_ENCRYPTION_CONFIG_H])AH_BOTTOM([#endif /* _GAIM_ENCRYPTION_CONFIG_H */])## Look for the C compiler#CFLAGS_save="$CFLAGS"AC_PROG_CCCFLAGS="$CFLAGS_save"## Utility function#check_for_header() {    file="$1"    bases="$2"    variations=". $3"    result=    for dir in $bases; do	if test -z "$result"; then	    for variant in $variations; do		if test -z "$result" -a -f "$dir/$variant/$file"; then		    result="$dir/$variant"		fi	    done	fi    done    if test -z "$result"; then	AC_MSG_RESULT([not found!])	AC_MSG_ERROR([*** Cannot continue])    fi}check_for_lib() {    func="$1"    lib="$2"    bases="$3"    variations="$4"    LIBS_save="$LIBS"    LDFLAGS_save="$LDFLAGS"    found=0    result=    LIBS="-l$lib $LIBS_save"    AC_CHECK_FUNC($func, result="$dir/$variant")    if test -z "$result"; then	for dir in $bases; do	    if test -z "$result"; then		for variant in $variations; do		    echo checking: $dir/$variant		    if test -z "$result"; then			if test -d "$dir/$variant"; then			    LDFLAGS="-L$dir/$variant $LDFLAGS_save"			    AC_CHECK_FUNC($func, result="$dir/$variant")			fi			cmd="unset ac_cv_func_$func"			eval $cmd			unset cmd		    fi		done	    fi	done    fi    if test -z "$result"; then	AC_MSG_RESULT([could not find $lib])	AC_MSG_ERROR([*** Cannot continue])    fi    LDFLAGS="-L$result $LDFLAGS_save"}## Check for Gaim#PKG_CHECK_MODULES(GAIM, gaim,[	AC_DEFINE(HAVE_GAIM, 1, [Define if we have found gaim.])])AC_SUBST(GAIM_CFLAGS)## Copied from Gaim's configure.ac:# Find the Mozilla NSPR/NSS libs#AC_ARG_WITH(nspr-includes,    [  --with-nspr-includes=PREFIX     Specify location of Mozilla nspr4 includes.],    [with_nspr_includes="$withval"])AC_ARG_WITH(nspr-libs,    [  --with-nspr-libs=PREFIX         Specify location of Mozilla nsp4 libs.],    [with_nspr_libs="$withval"])AC_ARG_WITH(nss-includes,    [  --with-nss-includes=PREFIX      Specify location of Mozilla nss3 includes.],    [with_nss_includes="$withval"])AC_ARG_WITH(nss-libs,    [  --with-nss-libs=PREFIX          Specify location of Mozilla nss3 libs.],    [with_nss_libs="$withval"])if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \    test -n "$with_nss_includes"  || test -n "$with_nss_libs"  ||    test "x$enable_nss" = "xstatic"; then        nss_manual_check="yes"else    nss_manual_check="no"fienable_nss="no"if test "x$nss_manual_check" = "xno"; then    PKG_CHECK_MODULES(NSS, mozilla-nss, have_nss="yes", have_nss="no")        if test "x$have_nss" = "xyes"; then        mozilla_nspr="mozilla-nspr"        mozilla_nss="mozilla-nss"                AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])        AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])                msg_ssl="Mozilla NSS"        enable_nss="yes"    else        nss_manual_check="yes"    fifiif test "x$nss_manual_check" = "xyes"; then    mozilla_nss=""    have_nspr_includes="no"    if test "x$with_nspr_includes" != "x"; then        CPPFLAGS_save=$CPPFLAGS                AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)        AC_MSG_RESULT()        CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"        AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ],                                        [ moz_nspr_includes="no"])        CPPFLAGS=$CPPFLAGS_save                    if test "x$moz_nspr_includes" != "xno" -a \            "x$moz_nspr_includes" != "x"; then            AC_MSG_CHECKING(again for Mozilla nspr4 includes in $with_nspr_includes)            AC_MSG_RESULT(yes)                        have_nspr_includes="yes"            NSPR_CFLAGS="-I$with_nspr_includes"        else            AC_MSG_CHECKING(again for Mozilla nspr4 includes in $with_nspr_includes)            AC_MSG_RESULT(no)            AC_MSG_ERROR([--with-nspr-includes was specified, but nspr.h and prio.h]                         [were not there.])        fi    else        AC_MSG_CHECKING(for Mozilla nspr4 includes)        AC_MSG_RESULT(no)        AC_MSG_ERROR([You need to specify --with-nspr-includes="dir"]                     [(where "dir" is the location of the NSPR headers like prio.h)])    fi        have_nspr_libs="no"        if test "x$with_nspr_libs"     != "x" -a \        "x$have_nspr_includes" != "xno"; then                CFLAGS_save=$CFLAGS        LDFLAGS_save=$LDFLAGS                if test "$enable_nss" = "static"; then            if test -z "$with_nspr_libs"; then                AC_MSG_ERROR(                    [Static linkage requested, but path to nspr libraries not set.]                    [Please specify the path to libnspr4.a]                    [Example: --with-nspr-libs=/usr/lib])            else                nsprrootlibs="$with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"            fi        else            nsprrootlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"        fi                nsprlibs="-ldl $nsprrootlibs"        AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,            [                LIBS_save=$LIBS                CFLAGS="$CFLAGS $NSPR_CFLAGS"                                LIBS="$nsprlibs"                                if test "x$with_nspr_libs" != "x"; then                    LDFLAGS="$LDFLAGS -L$with_nspr_libs"                else                    LDFLAGS="$LDFLAGS"                fi                                AC_TRY_LINK_FUNC(PR_Init,                    [moz_nspr_libs="yes"],                    [moz_nspr_libs="no"])                                if test "x$moz_nspr_libs" != "xyes"; then                    nsprlibs="$nsprrootlibs"                    LIBS="$nsprlibs"                    AC_TRY_LINK_FUNC(PR_Init,                        [moz_nspr_libs="yes"],                        [moz_nspr_libs="no"])                fi                CFLAGS=$CFLAGS_save                LDFLAGS=$LDFLAGS_save                LIBS=$LIBS_save                ])                if test "x$moz_nspr_libs" != "xno"; then            have_nspr_libs="yes"            NSPR_LIBS="-L$with_nspr_libs $nsprlibs"        else            AC_MSG_CHECKING(for Mozilla nspr4 libraries)            AC_MSG_RESULT(no)            AC_MSG_ERROR([Error trying to link against the NSPR libraries.]                [Make sure to specify --with-nspr-libs="dir"]                [where "dir" is the location of the NSPR library file,]                [probably libnspr4.so or libnspr4.a])        fi    else        AC_MSG_CHECKING(for Mozilla nspr4 libraries)        AC_MSG_RESULT(no)        AC_MSG_ERROR([You need to specify --with-nspr-libs="dir"]                     [where "dir" is the location of the NSPR library file,]                     [probably libnspr4.so or libnspr4.a])    fi        have_nss_includes="no"        if test "x$with_nss_includes" != "x" -a \        "x$have_nspr_libs"    != "xno"; then                CPPFLAGS_save=$CPPFLAGS                AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)        AC_MSG_RESULT()        if test "x$with_nspr_includes" != "x"; then            CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"        else            CPPFLAGS="$CPPFLAGS -I$with_nss_includes"        fi                    AC_CHECK_HEADERS(nss.h ssl.h smime.h,            [moz_nss_includes="yes"],            [moz_nss_includes="no"])                    CPPFLAGS=$CPPFLAGS_save                    if test "x$moz_nss_includes" = "xyes"; then            AC_MSG_CHECKING(again for Mozilla nss3 includes in $with_nss_includes)            AC_MSG_RESULT(yes)            have_nss_includes="yes"            NSS_CFLAGS="-I$with_nss_includes"        else            AC_MSG_CHECKING(again for Mozilla nss3 includes in $with_nss_includes)            AC_MSG_RESULT(no)            NSPR_CFLAGS=""            NSPR_LIBS=""        fi    else        AC_MSG_CHECKING(for Mozilla nss3 includes)        AC_MSG_RESULT(no)    fi        if test "x$with_nss_libs" != "x" -a \        "x$have_nss_includes" != "xno"; then                LDFLAGS_save=$LDFLAGS                if test "$enable_nss" = "static"; then            if test -z "$with_nss_libs"; then                AC_MSG_ERROR(                    [Static linkage requested, but path to nss libraries not set.]                    [Please specify the path to libnss3.a]                    [Example: --with-nss-libs=/usr/lib/mozilla])            else                nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"                                case "$host" in                    *solaris*)                        nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"                        ;;                esac            fi        else            nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"        fi                AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,            [                LIBS_save=$LIBS                LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"                LIBS="$nsslibs $nsprlibs"                                AC_TRY_LINK_FUNC(NSS_Init,                    [moz_nss_libs="yes"],                    [moz_nss_libs="no"])                                if test "x$moz_nss_libs" = "xno"; then                    nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"                    LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"                    AC_TRY_LINK_FUNC(NSS_Init,                        [moz_nss_libs="yes"],                        [moz_nss_libs="no"])                fi                                LDFLAGS=$LDFLAGS_save                LIBS=$LIBS_save                ])                if test "x$moz_nss_libs" != "xno"; then            AC_DEFINE(HAVE_NSS)            AC_DEFINE(HAVE_SSL)                        NSS_LIBS="-L$with_nss_libs $nsslibs"                        if test "$enable_nss" = "static"; then                msg_ssl="Mozilla NSS (static)"            else                msg_ssl="Mozilla NSS"            fi                        enable_nss="yes"        else            NSS_CFLAGS=""            NSPR_CFLAGS=""            NSPR_LIBS=""        fi    else        AC_MSG_ERROR(            [Could not find the Mozilla NSS libraries.]            [Please specify the path to libnss3.a (or libnss3.so)]            [Example: --with-nss-libs=/usr/lib/mozilla]            [and the path to the NSS include files (like nssbase.h)]            [Example: --with-nss-includes=/usr/include/nss])        AC_MSG_CHECKING(for Mozilla nss libraries)        AC_MSG_RESULT(no)    fi        NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"    NSS_LIBS="$NSPR_LIBS $NSS_LIBS"fiAC_SUBST(NSS_CFLAGS)AC_SUBST(NSS_LIBS)# Old auto-finding code:## Find the NSPR files## AC_ARG_WITH(nspr-includes,#     AC_HELP_STRING([--with-nspr-includes=PATH],# 		   [specify directory where nspr.h can be found]))# AC_MSG_CHECKING([for NSPR include files])# possible_nspr_dirs="$with_nspr_includes $prefix /usr /usr/include/mozilla /usr/include/mozilla-1.2.1 /usr/include/mozilla-1.4 /opt/mozilla /usr/local"# check_for_header nspr.h "$possible_nspr_dirs" "include nspr include/nspr"# AC_MSG_RESULT([$result])# CPPFLAGS="-I$result $CPPFLAGS"# AC_ARG_WITH(nspr-libs,#     AC_HELP_STRING([--with-nspr-libs=PATH],# 		   [specify directory where libnspr4.* can be found]))# possible_nspr_dirs="$with_nspr_libs $prefix /lib/mozilla /opt/mozilla /usr/local"# check_for_lib PR_GetError nspr4 "$possible_nspr_dirs" ". lib nspr lib/nspr"# LIBS="-lnspr4 $LIBS"## Find the NSS files## AC_ARG_WITH(nss-includes,#     AC_HELP_STRING([--with-nss-includes=PATH],# 		   [specify directory where nssbase.h can be found]))# AC_MSG_CHECKING([for NSS include files])# possible_nss_dirs="$with_nss_includes $prefix /usr /usr/include/mozilla /usr/include/mozilla-1.2.1 /usr/include/mozilla-1.4 /opt/mozilla /usr/local"# check_for_header nssbase.h "$possible_nss_dirs" "include nss include/nss"# AC_MSG_RESULT([$result])# CPPFLAGS="-I$result $CPPFLAGS"# AC_ARG_WITH(nss-libs,#     AC_HELP_STRING([--with-nss-libs=PATH],# 		   [specify directory where libnss.* can be found]))# possible_nss_dirs="$with_nss_libs $prefix /lib/mozilla /opt/mozilla /usr/local"# check_for_lib PK11_GenerateKeyPair nss3 "$possible_nss_dirs" ". lib nss lib/nss"## Stolen from the gaim configure.ac file#AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([*** GTK+ 2.0 is required to build Gaim; please make sure you have the GTK+*** development headers installed. The latest version of GTK+ is*** always available at http://www.gtk.org/.]))CPPFLAGS="$GTK_CFLAGS $CPPFLAGS"## A little tomfoolery to make this buildable both in the gaim# structure and standalone#want_plugins=yesAM_CONDITIONAL(PLUGINS, test "$want_plugins" = "yes")## Setup libtool#AM_PROG_LIBTOOL## Party on#AM_CONFIG_HEADER(pre-config.h)AC_OUTPUT([Makefile intl/Makefile po/Makefile.in])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -