If the only two choices are either a log transformation or no transformation of the dependent variable, then to get the AIC values on an equal footing and allow for a comparison one could perform the linear regression on the untransformed dependent variable and on the log-transformed dependent variable multiplied by the geometric mean.
First (using R for this example) generate some data with a model that's linear in the logs of the dependent variable:
x = c(1:10)
y = exp(1 + 0.2*x + 0.2*rnorm(10))
Fit a linear regression on $y$ given $x$:
lm.y = lm(y ~ x)
Now fit a linear regression on the geometric mean times the log of $y$ given $x$:
lm.logy = lm(I(mean(log(y))*log(y)) ~ x)
The difference in the AIC values is around 32 which would suggest that taking the logs would produce a better model. (Not necessarily a good model, but a better model.)
If the choice of the transformation is on some unknown power (rather than just "knowing" that either a log transformation or no transformation are the only two options), then that power should be estimated simultaneously with the regression parameters. See Box-Cox transformations.