X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2Fconfigure.ac;fp=ETL%2Ftrunk%2Fconfigure.ac;h=fff4a6a4afc35c9d3e813619231e35d7f6315af2;hb=2fde73ebec7ee1bcb147abc19d16b1bc0deb17bf;hp=63f5e963adc4446e9fd32ae765ee306d1d6411aa;hpb=a75d39ae6509cd7b24e8924ffab41e8014591a8f;p=synfig.git diff --git a/ETL/trunk/configure.ac b/ETL/trunk/configure.ac index 63f5e96..fff4a6a 100644 --- a/ETL/trunk/configure.ac +++ b/ETL/trunk/configure.ac @@ -6,7 +6,7 @@ AC_INIT([Extended Template Library],[0.04.12],[http://synfig.org/Bugs],[ETL]) AC_REVISION AC_CONFIG_AUX_DIR(config) -AC_CONFIG_HEADERS([ETL/etl_profile_.h]) +AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_HOST AC_CANONICAL_TARGET @@ -41,27 +41,41 @@ AC_WIN32_QUIRKS # -- L I B R A R I E S ---------------------------------------- -# -- H E A D E R S -------------------------------------------- +AC_CHECK_LIB([user32], [main]) +AC_CHECK_LIB([kernel32], [CreateMutex]) +AC_CHECK_LIB([pthread], [pthread_mutex_init], , [HAVE_LIBPTHREAD=no]) -AH_TOP([ -// We want to be autoconf/autoheader friendly, so -// if the developer has already included an -// autoheader-generated configuration script, -// we can assume that the user knew what they -// were doing and let them use their own config.h. -//#ifndef PACKAGE_TARNAME -]) +if test x$HAVE_LIBPTHREAD = xno ; then + D_LIBPTHREAD="#undef" +else + D_LIBPTHREAD="#define" +fi -AH_BOTTOM([ -//#endif // ifndef PACKAGE_TARNAME -]) +# -- H E A D E R S -------------------------------------------- +AC_HEADER_STDC +AC_CHECK_HEADERS([pthread.h], [D_PTHREAD_H="#define"], [D_PTHREAD_H="#undef"]) +AC_CHECK_HEADERS([sched.h], [D_SCHED_H="#define"], [D_SCHED_H="#undef"]) +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([unistd.h]) +AC_CHECK_HEADERS([windows.h]) # -- T Y P E S & S T R U C T S -------------------------------- # -- F U N C T I O N S ---------------------------------------- -ETL_DEPS +AC_CHECK_FUNCS([pthread_create], [D_PTHREAD_CREATE="#define"], [D_PTHREAD_CREATE="#undef"]) +AC_CHECK_FUNCS([pthread_rwlock_init], [D_PTHREAD_RWLOCK_INIT="#define"], [D_PTHREAD_RWLOCK_INIT="#undef"]) +AC_CHECK_FUNCS([sched_yield], [D_SCHED_YIELD="#define"], [D_SCHED_YIELD="#undef"]) +AC_CHECK_FUNCS([CreateThread], [D_CREATETHREAD="#define"], [D_CREATETHREAD="#undef"]) +AC_CHECK_FUNCS([QueryPerformanceCounter], [D_QUERYPERFORMANCECOUNTER="#define"], [D_QUERYPERFORMANCECOUNTER="#undef"]) +AC_CHECK_FUNCS([gettimeofday], [D_GETTIMEOFDAY="#define"], [D_GETTIMEOFDAY="#undef"]) +AC_CHECK_FUNCS([sscanf], [D_SSCANF="#define"], [D_SSCANF="#undef"]) +AC_CHECK_FUNCS([vsscanf], [D_VSSCANF="#define"], [D_VSSCANF="#undef"]) +AC_CHECK_FUNCS([vsprintf], [D_VSPRINTF="#define"], [D_VSPRINTF="#undef"]) +AC_CHECK_FUNCS([vasprintf], [D_VASPRINTF="#define"], [D_VASPRINTF="#undef"]) +AC_CHECK_FUNCS([vsnprintf], [D_VSNPRINTF="#define"], [D_VSNPRINTF="#undef"]) +AC_CHECK_FUNCS([_vsnprintf], [D__VSNPRINTF="#define"], [D__VSNPRINTF="#undef"]) # -- O U T P U T ---------------------------------------------- @@ -69,7 +83,29 @@ AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) +# Libraries +AC_SUBST(D_LIBPTHREAD) + +# Headers +AC_SUBST(D_PTHREAD_H) +AC_SUBST(D_SCHED_H) + +# Functions +AC_SUBST(D_PTHREAD_CREATE) +AC_SUBST(D_PTHREAD_RWLOCK_INIT) +AC_SUBST(D_SCHED_YIELD) +AC_SUBST(D_CREATETHREAD) +AC_SUBST(D_QUERYPERFORMANCECOUNTER) +AC_SUBST(D_GETTIMEOFDAY) +AC_SUBST(D_SSCANF) +AC_SUBST(D_VSSCANF) +AC_SUBST(D_VSPRINTF) +AC_SUBST(D_VASPRINTF) +AC_SUBST(D_VSNPRINTF) +AC_SUBST(D__VSNPRINTF) + AC_CONFIG_FILES([ETL-config +ETL/etl_profile.h Makefile ETL/Makefile test/Makefile