comparison configure.ac @ 898:4f1988cb79ce

Fix building with system libtomcrypt/libtommath
author Matt Johnston <matt@ucc.asn.au>
date Tue, 18 Feb 2014 21:03:27 +0800
parents 12d5f40894ec
children 7cd89d4e0335
comparison
equal deleted inserted replaced
897:5d3e917bb7a6 898:4f1988cb79ce
369 if test "x$enableval" = "xyes"; then 369 if test "x$enableval" = "xyes"; then
370 BUNDLED_LIBTOM=1 370 BUNDLED_LIBTOM=1
371 AC_MSG_NOTICE(Forcing bundled libtom*) 371 AC_MSG_NOTICE(Forcing bundled libtom*)
372 else 372 else
373 BUNDLED_LIBTOM=0 373 BUNDLED_LIBTOM=0
374 AC_CHECK_LIB(tommath, mp_exptmod, , 374 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath",
375 [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] )
376 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt",
375 [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] ) 377 [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
376 AC_CHECK_LIB(tomcrypt, register_cipher, ,
377 [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
378 fi 378 fi
379 ], 379 ],
380 [ 380 [
381 BUNDLED_LIBTOM=0 381 BUNDLED_LIBTOM=0
382 AC_CHECK_LIB(tommath, mp_exptmod, , BUNDLED_LIBTOM=1) 382 AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1)
383 AC_CHECK_LIB(tomcrypt, register_cipher, , BUNDLED_LIBTOM=1) 383 AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1)
384 ] 384 ]
385 ) 385 )
386 386
387 if test $BUNDLED_LIBTOM = 1 ; then 387 if test $BUNDLED_LIBTOM = 1 ; then
388 AC_DEFINE(BUNDLED_LIBTOM,,Use bundled libtom) 388 AC_DEFINE(BUNDLED_LIBTOM,,Use bundled libtom)
389 fi 389 fi
390 390
391 AC_SUBST(LIBTOM_LIBS)
391 AC_SUBST(BUNDLED_LIBTOM) 392 AC_SUBST(BUNDLED_LIBTOM)
392 393
393 dnl Added from OpenSSH 3.6.1p2's configure.ac 394 dnl Added from OpenSSH 3.6.1p2's configure.ac
394 395
395 dnl allow user to disable some login recording features 396 dnl allow user to disable some login recording features